File tree Expand file tree Collapse file tree 5 files changed +97
-1
lines changed Expand file tree Collapse file tree 5 files changed +97
-1
lines changed Original file line number Diff line number Diff line change 18
18
class Symfony3Custom_Sniffs_Classes_PropertyDeclarationSniff
19
19
implements PHP_CodeSniffer_Sniff
20
20
{
21
-
22
21
/**
23
22
* A list of tokenizers this sniff supports.
24
23
*
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ class Class1
4
+ {
5
+ }
6
+
7
+ class Class2
8
+ {
9
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /**
4
+ * Unit test class for the MultipleClassesOneFile sniff.
5
+ *
6
+ * A sniff unit test checks a .inc file for expected violations of a single
7
+ * coding standard. Expected errors and warnings are stored in this class.
8
+ */
9
+ class Symfony3Custom_Tests_Classes_MultipleClassesOneFileUnitTest
10
+ extends AbstractSniffUnitTest
11
+ {
12
+ /**
13
+ * Returns the lines where errors should occur.
14
+ *
15
+ * The key of the array should represent the line number and the value
16
+ * should represent the number of errors that should occur on that line.
17
+ *
18
+ * @return array<int, int>
19
+ */
20
+ public function getErrorList ()
21
+ {
22
+ return array (
23
+ 7 => 1 ,
24
+ );
25
+ }
26
+
27
+ /**
28
+ * Returns the lines where warnings should occur.
29
+ *
30
+ * The key of the array should represent the line number and the value
31
+ * should represent the number of errors that should occur on that line.
32
+ *
33
+ * @return array(int => int)
34
+ */
35
+ public function getWarningList ()
36
+ {
37
+ return array ();
38
+ }
39
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ class ClassTest
4
+ {
5
+ public function functionTest () {
6
+
7
+ }
8
+
9
+ private $ property ;
10
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /**
4
+ * Unit test class for the PropertyDeclaration sniff.
5
+ *
6
+ * A sniff unit test checks a .inc file for expected violations of a single
7
+ * coding standard. Expected errors and warnings are stored in this class.
8
+ */
9
+ class Symfony3Custom_Tests_Classes_PropertyDeclarationUnitTest
10
+ extends AbstractSniffUnitTest
11
+ {
12
+ /**
13
+ * Returns the lines where errors should occur.
14
+ *
15
+ * The key of the array should represent the line number and the value
16
+ * should represent the number of errors that should occur on that line.
17
+ *
18
+ * @return array<int, int>
19
+ */
20
+ public function getErrorList ()
21
+ {
22
+ return array (
23
+ 9 => 1 ,
24
+ );
25
+ }
26
+
27
+ /**
28
+ * Returns the lines where warnings should occur.
29
+ *
30
+ * The key of the array should represent the line number and the value
31
+ * should represent the number of errors that should occur on that line.
32
+ *
33
+ * @return array(int => int)
34
+ */
35
+ public function getWarningList ()
36
+ {
37
+ return array ();
38
+ }
39
+ }
You can’t perform that action at this time.
0 commit comments