File tree Expand file tree Collapse file tree 3 files changed +35
-16
lines changed Expand file tree Collapse file tree 3 files changed +35
-16
lines changed Original file line number Diff line number Diff line change 2
2
namespace Magento2 \Sniffs \Commenting ;
3
3
4
4
use PHP_CodeSniffer \Files \File ;
5
- use PHP_CodeSniffer \Sniffs \Sniff ;
5
+ use PHP_CodeSniffer \Sniffs \AbstractVariableSniff ;
6
6
7
- class ClassPropertyPHPDocFormattingSniff implements Sniff
7
+ /**
8
+ * Class ClassPropertyPHPDocFormattingSniff
9
+ */
10
+ class ClassPropertyPHPDocFormattingSniff extends AbstractVariableSniff
8
11
{
9
12
13
+ /**
14
+ * @var array
15
+ */
10
16
private $ ignoreTokens = [
11
17
T_PUBLIC ,
12
18
T_PRIVATE ,
@@ -17,19 +23,11 @@ class ClassPropertyPHPDocFormattingSniff implements Sniff
17
23
];
18
24
19
25
/**
20
- * @inheritDoc
26
+ * @param File $phpcsFile
27
+ * @param int $stackPtr
28
+ * @return int|void
21
29
*/
22
- public function register ()
23
- {
24
- return [
25
- T_VARIABLE
26
- ];
27
- }
28
-
29
- /**
30
- * @inheritDoc
31
- */
32
- public function process (File $ phpcsFile , $ stackPtr )
30
+ public function processMemberVar (File $ phpcsFile , $ stackPtr )
33
31
{
34
32
$ tokens = $ phpcsFile ->getTokens ();
35
33
@@ -69,4 +67,24 @@ public function process(File $phpcsFile, $stackPtr)
69
67
return ;
70
68
}
71
69
}
70
+
71
+ /**
72
+ * @param File $phpcsFile
73
+ * @param int $stackPtr
74
+ * @return int|void
75
+ * phpcs:disable Magento2.CodeAnalysis.EmptyBlock
76
+ */
77
+ protected function processVariable (File $ phpcsFile , $ stackPtr )
78
+ {
79
+ }
80
+
81
+ /**
82
+ * @param File $phpcsFile
83
+ * @param int $stackPtr
84
+ * @return int|void
85
+ * phpcs:disable Magento2.CodeAnalysis.EmptyBlock
86
+ */
87
+ protected function processVariableInString (File $ phpcsFile , $ stackPtr )
88
+ {
89
+ }
72
90
}
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ class DirectThrowSniff implements Sniff
16
16
/**
17
17
* String representation of warning.
18
18
* phpcs:disable Generic.Files.LineLength.TooLong
19
+ * @var string
19
20
*/
20
21
protected $ warningMessage = 'Direct throw of generic Exception is discouraged. Use context specific instead. ' ;
21
22
//phpcs:enable
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ class SuperglobalSniff implements Sniff
42
42
protected $ errorCode = 'SuperglobalUsageError ' ;
43
43
44
44
/**
45
- * @inheritdoc
45
+ * @var array
46
46
*/
47
47
protected $ superGlobalErrors = [
48
48
'$GLOBALS ' ,
@@ -55,7 +55,7 @@ class SuperglobalSniff implements Sniff
55
55
];
56
56
57
57
/**
58
- * @inheritdoc
58
+ * @var array
59
59
*/
60
60
protected $ superGlobalWarning = [
61
61
'$_COOKIE ' , //sometimes need to get list of all cookies array and there are no methods to do that in M2
You can’t perform that action at this time.
0 commit comments