Skip to content

Commit 5cf84ba

Browse files
committed
Update to PHPCS 4
1 parent 5a8962f commit 5cf84ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+65
-171
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@ jobs:
77
strategy:
88
matrix:
99
php_version:
10-
- 5.6
11-
- 7.0
12-
- 7.1
1310
- 7.2
1411
- 7.3
1512
- 7.4
1613
- 8.0
1714
- 8.1
1815
- 8.2
1916
- 8.3
17+
- 8.4
2018
runs-on: ubuntu-latest
2119
steps:
2220
- name: Check out repository code

Symfony/Sniffs/Arrays/MultiLineArrayCommaSniff.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,6 @@
3131
*/
3232
class MultiLineArrayCommaSniff implements Sniff
3333
{
34-
/**
35-
* A list of tokenizers this sniff supports.
36-
*
37-
* @var array
38-
*/
39-
public $supportedTokenizers = array(
40-
'PHP',
41-
);
42-
4334
/**
4435
* Returns an array of tokens this test wants to listen for.
4536
*

Symfony/Sniffs/Classes/MultipleClassesOneFileSniff.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,6 @@ class MultipleClassesOneFileSniff implements Sniff
5656
*/
5757
protected $currentFile;
5858

59-
/**
60-
* A list of tokenizers this sniff supports.
61-
*
62-
* @var array
63-
*/
64-
public $supportedTokenizers = array(
65-
'PHP',
66-
);
67-
6859
/**
6960
* Returns an array of tokens this test wants to listen for.
7061
*

Symfony/Sniffs/Classes/PropertyDeclarationSniff.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,6 @@
3232
*/
3333
class PropertyDeclarationSniff implements Sniff
3434
{
35-
36-
/**
37-
* A list of tokenizers this sniff supports.
38-
*
39-
* @var array
40-
*/
41-
public $supportedTokenizers = array(
42-
'PHP',
43-
);
44-
4535
/**
4636
* Returns an array of tokens this test wants to listen for.
4737
*

Symfony/Sniffs/Commenting/ClassCommentSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ClassCommentSniff extends Sniff
4646
*
4747
* @var array
4848
*/
49-
protected $tags = array(
49+
protected const EXPECTED_TAGS = array(
5050
'category' => array(
5151
'required' => false,
5252
'allow_multiple' => false,

Symfony/Sniffs/Errors/UserDeprecatedSniff.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public function register()
3838
{
3939
return array(
4040
T_STRING,
41+
T_NAME_FULLY_QUALIFIED,
4142
);
4243
}
4344

@@ -58,7 +59,9 @@ public function process(File $phpcsFile, $stackPtr)
5859
{
5960
$tokens = $phpcsFile->getTokens();
6061

61-
if ($tokens[$stackPtr]['content'] !== 'trigger_error') {
62+
if ($tokens[$stackPtr]['content'] !== 'trigger_error'
63+
&& $tokens[$stackPtr]['content'] !== '\trigger_error'
64+
) {
6265
return;
6366
}
6467

Symfony/Sniffs/Formatting/BlankLineBeforeReturnSniff.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,6 @@
4141
*/
4242
class BlankLineBeforeReturnSniff implements Sniff
4343
{
44-
/**
45-
* A list of tokenizers this sniff supports.
46-
*
47-
* @var array
48-
*/
49-
public $supportedTokenizers = array(
50-
'PHP',
51-
'JS',
52-
);
53-
5444
/**
5545
* Returns an array of tokens this test wants to listen for.
5646
*

Symfony/Sniffs/Functions/ScopeOrderSniff.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,6 @@
3232
*/
3333
class ScopeOrderSniff implements Sniff
3434
{
35-
36-
/**
37-
* A list of tokenizers this sniff supports.
38-
*
39-
* @var array
40-
*/
41-
public $supportedTokenizers = array(
42-
'PHP',
43-
);
44-
4535
/**
4636
* Returns an array of tokens this test wants to listen for.
4737
*

Symfony/Sniffs/NamingConventions/ValidClassNameSniff.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@
3232
*/
3333
class ValidClassNameSniff implements Sniff
3434
{
35-
/**
36-
* A list of tokenizers this sniff supports.
37-
*
38-
* @var array
39-
*/
40-
public $supportedTokenizers = array(
41-
'PHP',
42-
);
43-
4435
/**
4536
* Returns an array of tokens this test wants to listen for.
4637
*

Symfony/Sniffs/Objects/ObjectInstantiationSniff.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,6 @@
3232
*/
3333
class ObjectInstantiationSniff implements Sniff
3434
{
35-
/**
36-
* A list of tokenizers this sniff supports.
37-
*
38-
* @var array
39-
*/
40-
public $supportedTokenizers = array(
41-
'PHP',
42-
);
43-
44-
4535
/**
4636
* Returns an array of tokens this test wants to listen for.
4737
*
@@ -69,6 +59,8 @@ public function process(File $phpcsFile, $stackPtr)
6959
$allowed = array(
7060
T_STRING,
7161
T_NS_SEPARATOR,
62+
T_NAME_FULLY_QUALIFIED,
63+
T_NAME_QUALIFIED,
7264
T_VARIABLE,
7365
T_STATIC,
7466
T_SELF,

0 commit comments

Comments
 (0)