Skip to content

Commit

Permalink
restore intentional cs mistakes in test files;
Browse files Browse the repository at this point in the history
  • Loading branch information
ashnazg committed Jun 15, 2018
1 parent 0c20e37 commit 784c95f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 19 deletions.
18 changes: 16 additions & 2 deletions easy-coding-standard.neon
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,37 @@ parameters:
- tests/unit/phpDocumentor/Reflection/Php/Namespace_Test.php
- tests/unit/phpDocumentor/Reflection/Php/Trait_Test.php
PHP_CodeSniffer\Standards\Squiz\Sniffs\Scope\MethodScopeSniff:
- tests/component/project/Luigi/Pizza.php
- tests/component/project/Luigi/Valued.php
- tests/example.file.php
SlevomatCodingStandard\Sniffs\Classes\UnusedPrivateElementsSniff:
- tests/component/project/Luigi/Pizza.php
- tests/example.file.php
PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer:
- tests/example.file.php
PhpCsFixer\Fixer\ClassNotation\SingleClassElementPerStatementFixer:
- tests/component/project/Luigi/Pizza.php
- tests/example.file.php
PhpCsFixer\Fixer\NamespaceNotation\BlankLineAfterNamespaceFixer:
- tests/component/project/Luigi/Pizza.php
PhpCsFixer\Fixer\NamespaceNotation\SingleBlankLineBeforeNamespaceFixer:
- tests/component/project/Luigi/Pizza.php
PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer:
- tests/component/project/Luigi/Pizza.php
- tests/example.file.php
PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer:
- tests/component/project/Luigi/Pizza.php
- tests/component/project/Luigi/Valued.php
- tests/example.file.php
PhpCsFixer\Fixer\Phpdoc\PhpdocIndentFixer:
- tests/example.file.php
PhpCsFixer\Fixer\Phpdoc\PhpdocNoEmptyReturnFixer:
- tests/component/project/Luigi/Pizza.php
- tests/example.file.php
PhpCsFixer\Fixer\Phpdoc\PhpdocTrimFixer:
- tests/component/project/Luigi/Pizza.php
- tests/example.file.php
PhpCsFixer\Fixer\Phpdoc\PhpdocVarWithoutNameFixer:
- tests/component/project/Luigi/Pizza.php
- tests/example.file.php
Symplify\CodingStandard\Fixer\Commenting\RemoveUselessDocBlockFixer:
- tests/component/project/Luigi/Pizza.php
- tests/example.file.php
34 changes: 18 additions & 16 deletions tests/component/project/Luigi/Pizza.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* This file is part of phpDocumentor.
*
Expand All @@ -10,30 +11,27 @@
* @link http://phpdoc.org
*/


namespace Luigi;


class Pizza extends \Pizza
{
const
/** @var string DELIVERY designates that the delivery method is to deliver the pizza to the customer. */
DELIVERY = 'delivery';

const /** @var string PICKUP designates that the delivery method is that the customer picks the pizza up. */
DELIVERY = 'delivery',
/** @var string PICKUP designates that the delivery method is that the customer picks the pizza up. */
PICKUP = 'pickup';

/** @var static contains the active instance for this Pizza. */
private static $instance;
static private $instance;

/**
* @var Pizza\Style
* @var Pizza\Style $style
* @var Pizza\Sauce|null $sauce
* @var Pizza\Topping[] $toppings
*/
private $style;

private $sauce;

private $toppings;
private $style, $sauce, $toppings;

/**
* The size of the pizza in centimeters, defaults to 20cm.
Expand All @@ -42,11 +40,13 @@ class Pizza extends \Pizza
*/
public $size = \Luigi\Pizza\SIZE_20CM;

public $legacy; // don't use this anymore!

protected $packaging = self::PACKAGING;
var $legacy; // don't use this anymore!

protected $deliveryMethod;
protected
/** @var string $packaging The type of packaging for this Pizza */
$packaging = self::PACKAGING,
/** @var string $deliveryMethod Is the customer picking this pizza up or must it be delivered? */
$deliveryMethod;

private function __construct(Pizza\Style $style)
{
Expand All @@ -59,9 +59,11 @@ private function __construct(Pizza\Style $style)
* This method can be used to instantiate a new object of this class which can then be retrieved using
* {@see self::getInstance()}.
*
* @param Pizza\Style $style style of pizza
* @param Pizza\Style $style
*
* @see self::getInstance to retrieve the pizza object.
*
* @return void
*/
public static function createInstance(Pizza\Style $style)
{
Expand All @@ -71,7 +73,7 @@ public static function createInstance(Pizza\Style $style)
/**
* @return self
*/
public static function getInstance()
static function getInstance()
{
return self::$instance;
}
Expand Down
3 changes: 2 additions & 1 deletion tests/component/project/Luigi/Valued.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
// phpcs:ignoreFile
/**
* This file is part of phpDocumentor.
*
Expand All @@ -22,5 +23,5 @@ interface Valued
{
const BASE_PRICE = 1;

public function getPrice();
function getPrice();
}

0 comments on commit 784c95f

Please sign in to comment.