Skip to content

Commit 784c95f

Browse files
committed
restore intentional cs mistakes in test files;
1 parent 0c20e37 commit 784c95f

File tree

3 files changed

+36
-19
lines changed

3 files changed

+36
-19
lines changed

easy-coding-standard.neon

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,37 @@ parameters:
3737
- tests/unit/phpDocumentor/Reflection/Php/Namespace_Test.php
3838
- tests/unit/phpDocumentor/Reflection/Php/Trait_Test.php
3939
PHP_CodeSniffer\Standards\Squiz\Sniffs\Scope\MethodScopeSniff:
40+
- tests/component/project/Luigi/Pizza.php
41+
- tests/component/project/Luigi/Valued.php
4042
- tests/example.file.php
4143
SlevomatCodingStandard\Sniffs\Classes\UnusedPrivateElementsSniff:
4244
- tests/component/project/Luigi/Pizza.php
4345
- tests/example.file.php
44-
PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer:
45-
- tests/example.file.php
4646
PhpCsFixer\Fixer\ClassNotation\SingleClassElementPerStatementFixer:
47+
- tests/component/project/Luigi/Pizza.php
48+
- tests/example.file.php
49+
PhpCsFixer\Fixer\NamespaceNotation\BlankLineAfterNamespaceFixer:
50+
- tests/component/project/Luigi/Pizza.php
51+
PhpCsFixer\Fixer\NamespaceNotation\SingleBlankLineBeforeNamespaceFixer:
52+
- tests/component/project/Luigi/Pizza.php
53+
PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer:
54+
- tests/component/project/Luigi/Pizza.php
4755
- tests/example.file.php
4856
PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer:
57+
- tests/component/project/Luigi/Pizza.php
58+
- tests/component/project/Luigi/Valued.php
4959
- tests/example.file.php
5060
PhpCsFixer\Fixer\Phpdoc\PhpdocIndentFixer:
5161
- tests/example.file.php
5262
PhpCsFixer\Fixer\Phpdoc\PhpdocNoEmptyReturnFixer:
63+
- tests/component/project/Luigi/Pizza.php
5364
- tests/example.file.php
5465
PhpCsFixer\Fixer\Phpdoc\PhpdocTrimFixer:
66+
- tests/component/project/Luigi/Pizza.php
5567
- tests/example.file.php
5668
PhpCsFixer\Fixer\Phpdoc\PhpdocVarWithoutNameFixer:
69+
- tests/component/project/Luigi/Pizza.php
5770
- tests/example.file.php
5871
Symplify\CodingStandard\Fixer\Commenting\RemoveUselessDocBlockFixer:
72+
- tests/component/project/Luigi/Pizza.php
5973
- tests/example.file.php

tests/component/project/Luigi/Pizza.php

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
// phpcs:ignoreFile
23
/**
34
* This file is part of phpDocumentor.
45
*
@@ -10,30 +11,27 @@
1011
* @link http://phpdoc.org
1112
*/
1213

14+
1315
namespace Luigi;
1416

17+
1518
class Pizza extends \Pizza
1619
{
1720
const
1821
/** @var string DELIVERY designates that the delivery method is to deliver the pizza to the customer. */
19-
DELIVERY = 'delivery';
20-
21-
const /** @var string PICKUP designates that the delivery method is that the customer picks the pizza up. */
22+
DELIVERY = 'delivery',
23+
/** @var string PICKUP designates that the delivery method is that the customer picks the pizza up. */
2224
PICKUP = 'pickup';
2325

2426
/** @var static contains the active instance for this Pizza. */
25-
private static $instance;
27+
static private $instance;
2628

2729
/**
28-
* @var Pizza\Style
30+
* @var Pizza\Style $style
2931
* @var Pizza\Sauce|null $sauce
3032
* @var Pizza\Topping[] $toppings
3133
*/
32-
private $style;
33-
34-
private $sauce;
35-
36-
private $toppings;
34+
private $style, $sauce, $toppings;
3735

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

45-
public $legacy; // don't use this anymore!
46-
47-
protected $packaging = self::PACKAGING;
43+
var $legacy; // don't use this anymore!
4844

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

5151
private function __construct(Pizza\Style $style)
5252
{
@@ -59,9 +59,11 @@ private function __construct(Pizza\Style $style)
5959
* This method can be used to instantiate a new object of this class which can then be retrieved using
6060
* {@see self::getInstance()}.
6161
*
62-
* @param Pizza\Style $style style of pizza
62+
* @param Pizza\Style $style
6363
*
6464
* @see self::getInstance to retrieve the pizza object.
65+
*
66+
* @return void
6567
*/
6668
public static function createInstance(Pizza\Style $style)
6769
{
@@ -71,7 +73,7 @@ public static function createInstance(Pizza\Style $style)
7173
/**
7274
* @return self
7375
*/
74-
public static function getInstance()
76+
static function getInstance()
7577
{
7678
return self::$instance;
7779
}

tests/component/project/Luigi/Valued.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
// phpcs:ignoreFile
23
/**
34
* This file is part of phpDocumentor.
45
*
@@ -22,5 +23,5 @@ interface Valued
2223
{
2324
const BASE_PRICE = 1;
2425

25-
public function getPrice();
26+
function getPrice();
2627
}

0 commit comments

Comments
 (0)