@@ -2,91 +2,91 @@ |
||
2 | 2 | class TestClass extends MyClass |
3 | 3 | { |
4 | 4 | |
5 | - function TestClass() { |
|
6 | - parent::MyClass(); |
|
7 | - parent::__construct(); |
|
8 | - } |
|
5 | + function TestClass() { |
|
6 | + parent::MyClass(); |
|
7 | + parent::__construct(); |
|
8 | + } |
|
9 | 9 | |
10 | - function __construct() { |
|
11 | - parent::MYCLASS(); |
|
12 | - parent::__construct(); |
|
13 | - } |
|
10 | + function __construct() { |
|
11 | + parent::MYCLASS(); |
|
12 | + parent::__construct(); |
|
13 | + } |
|
14 | 14 | |
15 | 15 | } |
16 | 16 | |
17 | 17 | class MyClass |
18 | 18 | { |
19 | 19 | |
20 | - function MyClass() { |
|
21 | - parent::YourClass(); |
|
22 | - parent::__construct(); |
|
23 | - } |
|
20 | + function MyClass() { |
|
21 | + parent::YourClass(); |
|
22 | + parent::__construct(); |
|
23 | + } |
|
24 | 24 | |
25 | - function __construct() { |
|
26 | - parent::YourClass(); |
|
27 | - parent::__construct(); |
|
28 | - } |
|
25 | + function __construct() { |
|
26 | + parent::YourClass(); |
|
27 | + parent::__construct(); |
|
28 | + } |
|
29 | 29 | |
30 | 30 | } |
31 | 31 | |
32 | 32 | class MyOtherClass extends \MyNamespace\SomeClass |
33 | 33 | { |
34 | - function __construct() { |
|
35 | - something::MyNamespace(); |
|
36 | - } |
|
34 | + function __construct() { |
|
35 | + something::MyNamespace(); |
|
36 | + } |
|
37 | 37 | |
38 | 38 | } |
39 | 39 | |
40 | 40 | abstract class MyAbstractClass extends \MyNamespace\SomeClass |
41 | 41 | { |
42 | - abstract public function __construct(); |
|
42 | + abstract public function __construct(); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | class OldClass |
46 | 46 | { |
47 | - function OldClass() |
|
48 | - { |
|
47 | + function OldClass() |
|
48 | + { |
|
49 | 49 | |
50 | - } |
|
50 | + } |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | foo(new class extends MyClass |
54 | 54 | { |
55 | 55 | |
56 | - function TestClass() { |
|
57 | - parent::MyClass(); |
|
58 | - parent::__construct(); |
|
59 | - } |
|
56 | + function TestClass() { |
|
57 | + parent::MyClass(); |
|
58 | + parent::__construct(); |
|
59 | + } |
|
60 | 60 | |
61 | - function __construct() { |
|
62 | - parent::MyClass(); |
|
63 | - parent::__construct(); |
|
64 | - } |
|
61 | + function __construct() { |
|
62 | + parent::MyClass(); |
|
63 | + parent::__construct(); |
|
64 | + } |
|
65 | 65 | |
66 | 66 | }); |
67 | 67 | |
68 | 68 | class OlderClass |
69 | 69 | { |
70 | - function OlderClass() {} |
|
70 | + function OlderClass() {} |
|
71 | 71 | |
72 | - function __CONSTRUCT() {} |
|
72 | + function __CONSTRUCT() {} |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | |
76 | 76 | // Issue #2178. |
77 | 77 | class Nested extends Another { |
78 | - public function getAnonymousClass() { |
|
79 | - return new class() extends Something { |
|
80 | - public function nested() { |
|
81 | - echo 'In method nested!'; |
|
82 | - parent::Another(); // OK. |
|
83 | - } |
|
84 | - |
|
85 | - public function __construct() { |
|
86 | - parent::Another(); // OK. |
|
78 | + public function getAnonymousClass() { |
|
79 | + return new class() extends Something { |
|
80 | + public function nested() { |
|
81 | + echo 'In method nested!'; |
|
82 | + parent::Another(); // OK. |
|
87 | 83 | } |
88 | - }; |
|
89 | - } |
|
90 | 84 | |
91 | - abstract public function nested(); |
|
85 | + public function __construct() { |
|
86 | + parent::Another(); // OK. |
|
87 | + } |
|
88 | + }; |
|
89 | + } |
|
90 | + |
|
91 | + abstract public function nested(); |
|
92 | 92 | } |
@@ -2,27 +2,27 @@ discard block |
||
2 | 2 | |
3 | 3 | abstract class My_Class { |
4 | 4 | |
5 | - public function __construct() {} |
|
6 | - public function My_Class() {} |
|
7 | - public function _My_Class() {} |
|
5 | + public function __construct() {} |
|
6 | + public function My_Class() {} |
|
7 | + public function _My_Class() {} |
|
8 | 8 | |
9 | - public function getSomeValue() {} |
|
10 | - public function parseMyDSN() {} |
|
11 | - public function get_some_value() {} |
|
12 | - public function GetSomeValue() {} |
|
13 | - public function getSomeValue_Again() {} |
|
9 | + public function getSomeValue() {} |
|
10 | + public function parseMyDSN() {} |
|
11 | + public function get_some_value() {} |
|
12 | + public function GetSomeValue() {} |
|
13 | + public function getSomeValue_Again() {} |
|
14 | 14 | |
15 | - protected function getSomeValue() {} |
|
16 | - protected function parseMyDSN() {} |
|
17 | - protected function get_some_value() {} |
|
15 | + protected function getSomeValue() {} |
|
16 | + protected function parseMyDSN() {} |
|
17 | + protected function get_some_value() {} |
|
18 | 18 | |
19 | - private function _getSomeValue() {} |
|
20 | - private function parseMyDSN() {} |
|
21 | - private function _get_some_value() {} |
|
19 | + private function _getSomeValue() {} |
|
20 | + private function parseMyDSN() {} |
|
21 | + private function _get_some_value() {} |
|
22 | 22 | |
23 | - function getSomeValue() {} |
|
24 | - function parseMyDSN() {} |
|
25 | - function get_some_value() {} |
|
23 | + function getSomeValue() {} |
|
24 | + function parseMyDSN() {} |
|
25 | + function get_some_value() {} |
|
26 | 26 | |
27 | 27 | }//end class |
28 | 28 | |
@@ -34,23 +34,23 @@ discard block |
||
34 | 34 | /* Test for magic functions */ |
35 | 35 | |
36 | 36 | class Magic_Test { |
37 | - function __construct() {} |
|
38 | - function __destruct() {} |
|
39 | - function __call($name, $args) {} |
|
40 | - static function __callStatic($name, $args) {} |
|
41 | - function __get($name) {} |
|
42 | - function __set($name, $value) {} |
|
43 | - function __isset($name) {} |
|
44 | - function __unset($name) {} |
|
45 | - function __sleep() {} |
|
46 | - function __wakeup() {} |
|
47 | - function __toString() {} |
|
48 | - function __set_state() {} |
|
49 | - function __clone() {} |
|
50 | - function __autoload() {} |
|
51 | - function __invoke() {} |
|
52 | - function __myFunction() {} |
|
53 | - function __my_function() {} |
|
37 | + function __construct() {} |
|
38 | + function __destruct() {} |
|
39 | + function __call($name, $args) {} |
|
40 | + static function __callStatic($name, $args) {} |
|
41 | + function __get($name) {} |
|
42 | + function __set($name, $value) {} |
|
43 | + function __isset($name) {} |
|
44 | + function __unset($name) {} |
|
45 | + function __sleep() {} |
|
46 | + function __wakeup() {} |
|
47 | + function __toString() {} |
|
48 | + function __set_state() {} |
|
49 | + function __clone() {} |
|
50 | + function __autoload() {} |
|
51 | + function __invoke() {} |
|
52 | + function __myFunction() {} |
|
53 | + function __my_function() {} |
|
54 | 54 | |
55 | 55 | } |
56 | 56 | |
@@ -74,94 +74,94 @@ discard block |
||
74 | 74 | |
75 | 75 | |
76 | 76 | class Closure_Test { |
77 | - function test() { |
|
78 | - $foo = function() { echo 'foo'; }; |
|
79 | - } |
|
77 | + function test() { |
|
78 | + $foo = function() { echo 'foo'; }; |
|
79 | + } |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | function test() { |
83 | - $foo = function() { echo 'foo'; }; |
|
83 | + $foo = function() { echo 'foo'; }; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | /* @codingStandardsIgnoreStart */ |
87 | 87 | class MyClass |
88 | 88 | { |
89 | - /* @codingStandardsIgnoreEnd */ |
|
90 | - public function __construct() {} |
|
89 | + /* @codingStandardsIgnoreEnd */ |
|
90 | + public function __construct() {} |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | trait Foo |
94 | 94 | { |
95 | - function __call($name, $args) {} |
|
95 | + function __call($name, $args) {} |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | class Magic_Case_Test { |
99 | - function __Construct() {} |
|
100 | - function __isSet($name) {} |
|
101 | - function __tostring() {} |
|
99 | + function __Construct() {} |
|
100 | + function __isSet($name) {} |
|
101 | + function __tostring() {} |
|
102 | 102 | } |
103 | 103 | function __autoLoad($class) {} |
104 | 104 | |
105 | 105 | class Foo extends \SoapClient |
106 | 106 | { |
107 | - public function __soapCall( |
|
108 | - $functionName, |
|
109 | - $arguments, |
|
110 | - $options = array(), |
|
111 | - $inputHeaders = null, |
|
112 | - &$outputHeaders = array() |
|
113 | - ) { |
|
114 | - // body |
|
115 | - } |
|
107 | + public function __soapCall( |
|
108 | + $functionName, |
|
109 | + $arguments, |
|
110 | + $options = array(), |
|
111 | + $inputHeaders = null, |
|
112 | + &$outputHeaders = array() |
|
113 | + ) { |
|
114 | + // body |
|
115 | + } |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | function __debugInfo() {} |
119 | 119 | class Foo { |
120 | - function __debugInfo() {} |
|
120 | + function __debugInfo() {} |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | function ___tripleUnderscore() {} // Ok. |
124 | 124 | |
125 | 125 | class triple { |
126 | - public function ___tripleUnderscore() {} // Ok. |
|
126 | + public function ___tripleUnderscore() {} // Ok. |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | /* Magic methods in anonymous classes. */ |
130 | 130 | $a = new class { |
131 | - function __construct() {} |
|
132 | - function __destruct() {} |
|
133 | - function __call($name, $args) {} |
|
134 | - static function __callStatic($name, $args) {} |
|
135 | - function __get($name) {} |
|
136 | - function __set($name, $value) {} |
|
137 | - function __isset($name) {} |
|
138 | - function __unset($name) {} |
|
139 | - function __sleep() {} |
|
140 | - function __wakeup() {} |
|
141 | - function __toString() {} |
|
142 | - function __set_state() {} |
|
143 | - function __clone() {} |
|
144 | - function __autoload() {} |
|
145 | - function __invoke() {} |
|
146 | - function __myFunction() {} |
|
147 | - function __my_function() {} |
|
131 | + function __construct() {} |
|
132 | + function __destruct() {} |
|
133 | + function __call($name, $args) {} |
|
134 | + static function __callStatic($name, $args) {} |
|
135 | + function __get($name) {} |
|
136 | + function __set($name, $value) {} |
|
137 | + function __isset($name) {} |
|
138 | + function __unset($name) {} |
|
139 | + function __sleep() {} |
|
140 | + function __wakeup() {} |
|
141 | + function __toString() {} |
|
142 | + function __set_state() {} |
|
143 | + function __clone() {} |
|
144 | + function __autoload() {} |
|
145 | + function __invoke() {} |
|
146 | + function __myFunction() {} |
|
147 | + function __my_function() {} |
|
148 | 148 | |
149 | 149 | }; |
150 | 150 | |
151 | 151 | class FooBar extends \SoapClient { |
152 | - public function __getCookies() {} |
|
152 | + public function __getCookies() {} |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | class Nested { |
156 | - public function getAnonymousClass() { |
|
157 | - return new class() { |
|
158 | - public function nested_function() {} |
|
159 | - function __something() {} |
|
160 | - }; |
|
161 | - } |
|
156 | + public function getAnonymousClass() { |
|
157 | + return new class() { |
|
158 | + public function nested_function() {} |
|
159 | + function __something() {} |
|
160 | + }; |
|
161 | + } |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | abstract class My_Class { |
165 | - public function my_class() {} |
|
166 | - public function _MY_CLASS() {} |
|
165 | + public function my_class() {} |
|
166 | + public function _MY_CLASS() {} |
|
167 | 167 | } |
@@ -15,74 +15,74 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - $errors = [ |
|
29 | - 10 => 1, |
|
30 | - 11 => 1, |
|
31 | - 12 => 1, |
|
32 | - 13 => 1, |
|
33 | - 16 => 1, |
|
34 | - 17 => 1, |
|
35 | - 20 => 1, |
|
36 | - 21 => 1, |
|
37 | - 24 => 1, |
|
38 | - 25 => 1, |
|
39 | - 30 => 1, |
|
40 | - 31 => 1, |
|
41 | - 50 => 1, |
|
42 | - 52 => 1, |
|
43 | - 53 => 2, |
|
44 | - 57 => 1, |
|
45 | - 58 => 1, |
|
46 | - 59 => 1, |
|
47 | - 60 => 1, |
|
48 | - 61 => 1, |
|
49 | - 62 => 1, |
|
50 | - 63 => 1, |
|
51 | - 64 => 1, |
|
52 | - 65 => 1, |
|
53 | - 66 => 1, |
|
54 | - 67 => 1, |
|
55 | - 68 => 2, |
|
56 | - 69 => 1, |
|
57 | - 71 => 1, |
|
58 | - 72 => 1, |
|
59 | - 73 => 2, |
|
60 | - 118 => 1, |
|
61 | - 144 => 1, |
|
62 | - 146 => 1, |
|
63 | - 147 => 2, |
|
64 | - 158 => 1, |
|
65 | - 159 => 1, |
|
66 | - ]; |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + $errors = [ |
|
29 | + 10 => 1, |
|
30 | + 11 => 1, |
|
31 | + 12 => 1, |
|
32 | + 13 => 1, |
|
33 | + 16 => 1, |
|
34 | + 17 => 1, |
|
35 | + 20 => 1, |
|
36 | + 21 => 1, |
|
37 | + 24 => 1, |
|
38 | + 25 => 1, |
|
39 | + 30 => 1, |
|
40 | + 31 => 1, |
|
41 | + 50 => 1, |
|
42 | + 52 => 1, |
|
43 | + 53 => 2, |
|
44 | + 57 => 1, |
|
45 | + 58 => 1, |
|
46 | + 59 => 1, |
|
47 | + 60 => 1, |
|
48 | + 61 => 1, |
|
49 | + 62 => 1, |
|
50 | + 63 => 1, |
|
51 | + 64 => 1, |
|
52 | + 65 => 1, |
|
53 | + 66 => 1, |
|
54 | + 67 => 1, |
|
55 | + 68 => 2, |
|
56 | + 69 => 1, |
|
57 | + 71 => 1, |
|
58 | + 72 => 1, |
|
59 | + 73 => 2, |
|
60 | + 118 => 1, |
|
61 | + 144 => 1, |
|
62 | + 146 => 1, |
|
63 | + 147 => 2, |
|
64 | + 158 => 1, |
|
65 | + 159 => 1, |
|
66 | + ]; |
|
67 | 67 | |
68 | - return $errors; |
|
68 | + return $errors; |
|
69 | 69 | |
70 | - }//end getErrorList() |
|
70 | + }//end getErrorList() |
|
71 | 71 | |
72 | 72 | |
73 | - /** |
|
74 | - * Returns the lines where warnings should occur. |
|
75 | - * |
|
76 | - * The key of the array should represent the line number and the value |
|
77 | - * should represent the number of warnings that should occur on that line. |
|
78 | - * |
|
79 | - * @return array<int, int> |
|
80 | - */ |
|
81 | - public function getWarningList() |
|
82 | - { |
|
83 | - return []; |
|
73 | + /** |
|
74 | + * Returns the lines where warnings should occur. |
|
75 | + * |
|
76 | + * The key of the array should represent the line number and the value |
|
77 | + * should represent the number of warnings that should occur on that line. |
|
78 | + * |
|
79 | + * @return array<int, int> |
|
80 | + */ |
|
81 | + public function getWarningList() |
|
82 | + { |
|
83 | + return []; |
|
84 | 84 | |
85 | - }//end getWarningList() |
|
85 | + }//end getWarningList() |
|
86 | 86 | |
87 | 87 | |
88 | 88 | }//end class |
@@ -16,55 +16,55 @@ |
||
16 | 16 | { |
17 | 17 | |
18 | 18 | |
19 | - /** |
|
20 | - * Should this test be skipped for some reason. |
|
21 | - * |
|
22 | - * @return void |
|
23 | - */ |
|
24 | - protected function shouldSkipTest() |
|
25 | - { |
|
26 | - $csslintPath = Config::getExecutablePath('csslint'); |
|
27 | - if ($csslintPath === null) { |
|
28 | - return true; |
|
29 | - } |
|
19 | + /** |
|
20 | + * Should this test be skipped for some reason. |
|
21 | + * |
|
22 | + * @return void |
|
23 | + */ |
|
24 | + protected function shouldSkipTest() |
|
25 | + { |
|
26 | + $csslintPath = Config::getExecutablePath('csslint'); |
|
27 | + if ($csslintPath === null) { |
|
28 | + return true; |
|
29 | + } |
|
30 | 30 | |
31 | - return false; |
|
31 | + return false; |
|
32 | 32 | |
33 | - }//end shouldSkipTest() |
|
33 | + }//end shouldSkipTest() |
|
34 | 34 | |
35 | 35 | |
36 | - /** |
|
37 | - * Returns the lines where errors should occur. |
|
38 | - * |
|
39 | - * The key of the array should represent the line number and the value |
|
40 | - * should represent the number of errors that should occur on that line. |
|
41 | - * |
|
42 | - * @return array<int, int> |
|
43 | - */ |
|
44 | - public function getErrorList() |
|
45 | - { |
|
46 | - return []; |
|
36 | + /** |
|
37 | + * Returns the lines where errors should occur. |
|
38 | + * |
|
39 | + * The key of the array should represent the line number and the value |
|
40 | + * should represent the number of errors that should occur on that line. |
|
41 | + * |
|
42 | + * @return array<int, int> |
|
43 | + */ |
|
44 | + public function getErrorList() |
|
45 | + { |
|
46 | + return []; |
|
47 | 47 | |
48 | - }//end getErrorList() |
|
48 | + }//end getErrorList() |
|
49 | 49 | |
50 | 50 | |
51 | - /** |
|
52 | - * Returns the lines where warnings should occur. |
|
53 | - * |
|
54 | - * The key of the array should represent the line number and the value |
|
55 | - * should represent the number of warnings that should occur on that line. |
|
56 | - * |
|
57 | - * @return array<int, int> |
|
58 | - */ |
|
59 | - public function getWarningList() |
|
60 | - { |
|
61 | - return [ |
|
62 | - 3 => 1, |
|
63 | - 4 => 1, |
|
64 | - 5 => 1, |
|
65 | - ]; |
|
51 | + /** |
|
52 | + * Returns the lines where warnings should occur. |
|
53 | + * |
|
54 | + * The key of the array should represent the line number and the value |
|
55 | + * should represent the number of warnings that should occur on that line. |
|
56 | + * |
|
57 | + * @return array<int, int> |
|
58 | + */ |
|
59 | + public function getWarningList() |
|
60 | + { |
|
61 | + return [ |
|
62 | + 3 => 1, |
|
63 | + 4 => 1, |
|
64 | + 5 => 1, |
|
65 | + ]; |
|
66 | 66 | |
67 | - }//end getWarningList() |
|
67 | + }//end getWarningList() |
|
68 | 68 | |
69 | 69 | |
70 | 70 | }//end class |
@@ -16,52 +16,52 @@ |
||
16 | 16 | { |
17 | 17 | |
18 | 18 | |
19 | - /** |
|
20 | - * Should this test be skipped for some reason. |
|
21 | - * |
|
22 | - * @return void |
|
23 | - */ |
|
24 | - protected function shouldSkipTest() |
|
25 | - { |
|
26 | - $rhinoPath = Config::getExecutablePath('rhino'); |
|
27 | - $jshintPath = Config::getExecutablePath('jshint'); |
|
28 | - if ($rhinoPath === null && $jshintPath === null) { |
|
29 | - return true; |
|
30 | - } |
|
19 | + /** |
|
20 | + * Should this test be skipped for some reason. |
|
21 | + * |
|
22 | + * @return void |
|
23 | + */ |
|
24 | + protected function shouldSkipTest() |
|
25 | + { |
|
26 | + $rhinoPath = Config::getExecutablePath('rhino'); |
|
27 | + $jshintPath = Config::getExecutablePath('jshint'); |
|
28 | + if ($rhinoPath === null && $jshintPath === null) { |
|
29 | + return true; |
|
30 | + } |
|
31 | 31 | |
32 | - return false; |
|
32 | + return false; |
|
33 | 33 | |
34 | - }//end shouldSkipTest() |
|
34 | + }//end shouldSkipTest() |
|
35 | 35 | |
36 | 36 | |
37 | - /** |
|
38 | - * Returns the lines where errors should occur. |
|
39 | - * |
|
40 | - * The key of the array should represent the line number and the value |
|
41 | - * should represent the number of errors that should occur on that line. |
|
42 | - * |
|
43 | - * @return array<int, int> |
|
44 | - */ |
|
45 | - public function getErrorList() |
|
46 | - { |
|
47 | - return []; |
|
37 | + /** |
|
38 | + * Returns the lines where errors should occur. |
|
39 | + * |
|
40 | + * The key of the array should represent the line number and the value |
|
41 | + * should represent the number of errors that should occur on that line. |
|
42 | + * |
|
43 | + * @return array<int, int> |
|
44 | + */ |
|
45 | + public function getErrorList() |
|
46 | + { |
|
47 | + return []; |
|
48 | 48 | |
49 | - }//end getErrorList() |
|
49 | + }//end getErrorList() |
|
50 | 50 | |
51 | 51 | |
52 | - /** |
|
53 | - * Returns the lines where warnings should occur. |
|
54 | - * |
|
55 | - * The key of the array should represent the line number and the value |
|
56 | - * should represent the number of warnings that should occur on that line. |
|
57 | - * |
|
58 | - * @return array<int, int> |
|
59 | - */ |
|
60 | - public function getWarningList() |
|
61 | - { |
|
62 | - return [3 => 2]; |
|
52 | + /** |
|
53 | + * Returns the lines where warnings should occur. |
|
54 | + * |
|
55 | + * The key of the array should represent the line number and the value |
|
56 | + * should represent the number of warnings that should occur on that line. |
|
57 | + * |
|
58 | + * @return array<int, int> |
|
59 | + */ |
|
60 | + public function getWarningList() |
|
61 | + { |
|
62 | + return [3 => 2]; |
|
63 | 63 | |
64 | - }//end getWarningList() |
|
64 | + }//end getWarningList() |
|
65 | 65 | |
66 | 66 | |
67 | 67 | }//end class |
@@ -15,12 +15,12 @@ discard block |
||
15 | 15 | class ESLintUnitTest extends AbstractSniffUnitTest |
16 | 16 | { |
17 | 17 | |
18 | - /** |
|
19 | - * Basic ESLint config to use for testing the sniff. |
|
20 | - * |
|
21 | - * @var string |
|
22 | - */ |
|
23 | - const ESLINT_CONFIG = '{ |
|
18 | + /** |
|
19 | + * Basic ESLint config to use for testing the sniff. |
|
20 | + * |
|
21 | + * @var string |
|
22 | + */ |
|
23 | + const ESLINT_CONFIG = '{ |
|
24 | 24 | "parserOptions": { |
25 | 25 | "ecmaVersion": 5, |
26 | 26 | "sourceType": "script", |
@@ -33,81 +33,81 @@ discard block |
||
33 | 33 | }'; |
34 | 34 | |
35 | 35 | |
36 | - /** |
|
37 | - * Sets up this unit test. |
|
38 | - * |
|
39 | - * @return void |
|
40 | - */ |
|
41 | - protected function setUp() |
|
42 | - { |
|
43 | - parent::setUp(); |
|
44 | - |
|
45 | - $cwd = getcwd(); |
|
46 | - file_put_contents($cwd.'/.eslintrc.json', self::ESLINT_CONFIG); |
|
47 | - |
|
48 | - }//end setUp() |
|
49 | - |
|
50 | - |
|
51 | - /** |
|
52 | - * Remove artifact. |
|
53 | - * |
|
54 | - * @return void |
|
55 | - */ |
|
56 | - protected function tearDown() |
|
57 | - { |
|
58 | - parent::tearDown(); |
|
59 | - |
|
60 | - $cwd = getcwd(); |
|
61 | - unlink($cwd.'/.eslintrc.json'); |
|
62 | - |
|
63 | - }//end tearDown() |
|
64 | - |
|
65 | - |
|
66 | - /** |
|
67 | - * Should this test be skipped for some reason. |
|
68 | - * |
|
69 | - * @return void |
|
70 | - */ |
|
71 | - protected function shouldSkipTest() |
|
72 | - { |
|
73 | - $eslintPath = Config::getExecutablePath('eslint'); |
|
74 | - if ($eslintPath === null) { |
|
75 | - return true; |
|
76 | - } |
|
77 | - |
|
78 | - return false; |
|
79 | - |
|
80 | - }//end shouldSkipTest() |
|
81 | - |
|
82 | - |
|
83 | - /** |
|
84 | - * Returns the lines where errors should occur. |
|
85 | - * |
|
86 | - * The key of the array should represent the line number and the value |
|
87 | - * should represent the number of errors that should occur on that line. |
|
88 | - * |
|
89 | - * @return array<int, int> |
|
90 | - */ |
|
91 | - public function getErrorList() |
|
92 | - { |
|
93 | - return [1 => 2]; |
|
94 | - |
|
95 | - }//end getErrorList() |
|
96 | - |
|
97 | - |
|
98 | - /** |
|
99 | - * Returns the lines where warnings should occur. |
|
100 | - * |
|
101 | - * The key of the array should represent the line number and the value |
|
102 | - * should represent the number of warnings that should occur on that line. |
|
103 | - * |
|
104 | - * @return array<int, int> |
|
105 | - */ |
|
106 | - public function getWarningList() |
|
107 | - { |
|
108 | - return []; |
|
109 | - |
|
110 | - }//end getWarningList() |
|
36 | + /** |
|
37 | + * Sets up this unit test. |
|
38 | + * |
|
39 | + * @return void |
|
40 | + */ |
|
41 | + protected function setUp() |
|
42 | + { |
|
43 | + parent::setUp(); |
|
44 | + |
|
45 | + $cwd = getcwd(); |
|
46 | + file_put_contents($cwd.'/.eslintrc.json', self::ESLINT_CONFIG); |
|
47 | + |
|
48 | + }//end setUp() |
|
49 | + |
|
50 | + |
|
51 | + /** |
|
52 | + * Remove artifact. |
|
53 | + * |
|
54 | + * @return void |
|
55 | + */ |
|
56 | + protected function tearDown() |
|
57 | + { |
|
58 | + parent::tearDown(); |
|
59 | + |
|
60 | + $cwd = getcwd(); |
|
61 | + unlink($cwd.'/.eslintrc.json'); |
|
62 | + |
|
63 | + }//end tearDown() |
|
64 | + |
|
65 | + |
|
66 | + /** |
|
67 | + * Should this test be skipped for some reason. |
|
68 | + * |
|
69 | + * @return void |
|
70 | + */ |
|
71 | + protected function shouldSkipTest() |
|
72 | + { |
|
73 | + $eslintPath = Config::getExecutablePath('eslint'); |
|
74 | + if ($eslintPath === null) { |
|
75 | + return true; |
|
76 | + } |
|
77 | + |
|
78 | + return false; |
|
79 | + |
|
80 | + }//end shouldSkipTest() |
|
81 | + |
|
82 | + |
|
83 | + /** |
|
84 | + * Returns the lines where errors should occur. |
|
85 | + * |
|
86 | + * The key of the array should represent the line number and the value |
|
87 | + * should represent the number of errors that should occur on that line. |
|
88 | + * |
|
89 | + * @return array<int, int> |
|
90 | + */ |
|
91 | + public function getErrorList() |
|
92 | + { |
|
93 | + return [1 => 2]; |
|
94 | + |
|
95 | + }//end getErrorList() |
|
96 | + |
|
97 | + |
|
98 | + /** |
|
99 | + * Returns the lines where warnings should occur. |
|
100 | + * |
|
101 | + * The key of the array should represent the line number and the value |
|
102 | + * should represent the number of warnings that should occur on that line. |
|
103 | + * |
|
104 | + * @return array<int, int> |
|
105 | + */ |
|
106 | + public function getWarningList() |
|
107 | + { |
|
108 | + return []; |
|
109 | + |
|
110 | + }//end getWarningList() |
|
111 | 111 | |
112 | 112 | |
113 | 113 | }//end class |
@@ -16,54 +16,54 @@ |
||
16 | 16 | { |
17 | 17 | |
18 | 18 | |
19 | - /** |
|
20 | - * Should this test be skipped for some reason. |
|
21 | - * |
|
22 | - * @return void |
|
23 | - */ |
|
24 | - protected function shouldSkipTest() |
|
25 | - { |
|
26 | - $lintPath = Config::getExecutablePath('gjslint'); |
|
27 | - if ($lintPath === null) { |
|
28 | - return true; |
|
29 | - } |
|
19 | + /** |
|
20 | + * Should this test be skipped for some reason. |
|
21 | + * |
|
22 | + * @return void |
|
23 | + */ |
|
24 | + protected function shouldSkipTest() |
|
25 | + { |
|
26 | + $lintPath = Config::getExecutablePath('gjslint'); |
|
27 | + if ($lintPath === null) { |
|
28 | + return true; |
|
29 | + } |
|
30 | 30 | |
31 | - return false; |
|
31 | + return false; |
|
32 | 32 | |
33 | - }//end shouldSkipTest() |
|
33 | + }//end shouldSkipTest() |
|
34 | 34 | |
35 | 35 | |
36 | - /** |
|
37 | - * Returns the lines where errors should occur. |
|
38 | - * |
|
39 | - * The key of the array should represent the line number and the value |
|
40 | - * should represent the number of errors that should occur on that line. |
|
41 | - * |
|
42 | - * @return array<int, int> |
|
43 | - */ |
|
44 | - public function getErrorList() |
|
45 | - { |
|
46 | - return []; |
|
36 | + /** |
|
37 | + * Returns the lines where errors should occur. |
|
38 | + * |
|
39 | + * The key of the array should represent the line number and the value |
|
40 | + * should represent the number of errors that should occur on that line. |
|
41 | + * |
|
42 | + * @return array<int, int> |
|
43 | + */ |
|
44 | + public function getErrorList() |
|
45 | + { |
|
46 | + return []; |
|
47 | 47 | |
48 | - }//end getErrorList() |
|
48 | + }//end getErrorList() |
|
49 | 49 | |
50 | 50 | |
51 | - /** |
|
52 | - * Returns the lines where warnings should occur. |
|
53 | - * |
|
54 | - * The key of the array should represent the line number and the value |
|
55 | - * should represent the number of warnings that should occur on that line. |
|
56 | - * |
|
57 | - * @return array<int, int> |
|
58 | - */ |
|
59 | - public function getWarningList() |
|
60 | - { |
|
61 | - return [ |
|
62 | - 3 => 1, |
|
63 | - 5 => 1, |
|
64 | - ]; |
|
51 | + /** |
|
52 | + * Returns the lines where warnings should occur. |
|
53 | + * |
|
54 | + * The key of the array should represent the line number and the value |
|
55 | + * should represent the number of warnings that should occur on that line. |
|
56 | + * |
|
57 | + * @return array<int, int> |
|
58 | + */ |
|
59 | + public function getWarningList() |
|
60 | + { |
|
61 | + return [ |
|
62 | + 3 => 1, |
|
63 | + 5 => 1, |
|
64 | + ]; |
|
65 | 65 | |
66 | - }//end getWarningList() |
|
66 | + }//end getWarningList() |
|
67 | 67 | |
68 | 68 | |
69 | 69 | }//end class |
@@ -15,104 +15,104 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Get a list of CLI values to set before the file is tested. |
|
20 | - * |
|
21 | - * @param string $testFile The name of the file being tested. |
|
22 | - * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
23 | - * |
|
24 | - * @return void |
|
25 | - */ |
|
26 | - public function setCliValues($testFile, $config) |
|
27 | - { |
|
28 | - if ($testFile === 'DisallowSpaceIndentUnitTest.2.inc') { |
|
29 | - return; |
|
30 | - } |
|
18 | + /** |
|
19 | + * Get a list of CLI values to set before the file is tested. |
|
20 | + * |
|
21 | + * @param string $testFile The name of the file being tested. |
|
22 | + * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
23 | + * |
|
24 | + * @return void |
|
25 | + */ |
|
26 | + public function setCliValues($testFile, $config) |
|
27 | + { |
|
28 | + if ($testFile === 'DisallowSpaceIndentUnitTest.2.inc') { |
|
29 | + return; |
|
30 | + } |
|
31 | 31 | |
32 | - $config->tabWidth = 4; |
|
32 | + $config->tabWidth = 4; |
|
33 | 33 | |
34 | - }//end setCliValues() |
|
34 | + }//end setCliValues() |
|
35 | 35 | |
36 | 36 | |
37 | - /** |
|
38 | - * Returns the lines where errors should occur. |
|
39 | - * |
|
40 | - * The key of the array should represent the line number and the value |
|
41 | - * should represent the number of errors that should occur on that line. |
|
42 | - * |
|
43 | - * @param string $testFile The name of the file being tested. |
|
44 | - * |
|
45 | - * @return array<int, int> |
|
46 | - */ |
|
47 | - public function getErrorList($testFile='DisallowSpaceIndentUnitTest.1.inc') |
|
48 | - { |
|
49 | - switch ($testFile) { |
|
50 | - case 'DisallowSpaceIndentUnitTest.1.inc': |
|
51 | - case 'DisallowSpaceIndentUnitTest.2.inc': |
|
52 | - return [ |
|
53 | - 5 => 1, |
|
54 | - 9 => 1, |
|
55 | - 15 => 1, |
|
56 | - 22 => 1, |
|
57 | - 24 => 1, |
|
58 | - 30 => 1, |
|
59 | - 35 => 1, |
|
60 | - 50 => 1, |
|
61 | - 55 => 1, |
|
62 | - 57 => 1, |
|
63 | - 58 => 1, |
|
64 | - 59 => 1, |
|
65 | - 60 => 1, |
|
66 | - 65 => 1, |
|
67 | - 66 => 1, |
|
68 | - 67 => 1, |
|
69 | - 68 => 1, |
|
70 | - 69 => 1, |
|
71 | - 70 => 1, |
|
72 | - 73 => 1, |
|
73 | - 77 => 1, |
|
74 | - 81 => 1, |
|
75 | - 104 => 1, |
|
76 | - 105 => 1, |
|
77 | - 106 => 1, |
|
78 | - 107 => 1, |
|
79 | - 108 => 1, |
|
80 | - 110 => 1, |
|
81 | - 111 => 1, |
|
82 | - 112 => 1, |
|
83 | - 114 => 1, |
|
84 | - 115 => 1, |
|
85 | - 117 => 1, |
|
86 | - 118 => 1, |
|
87 | - ]; |
|
88 | - break; |
|
89 | - case 'DisallowSpaceIndentUnitTest.js': |
|
90 | - return [3 => 1]; |
|
91 | - break; |
|
92 | - case 'DisallowSpaceIndentUnitTest.css': |
|
93 | - return [2 => 1]; |
|
94 | - break; |
|
95 | - default: |
|
96 | - return []; |
|
97 | - break; |
|
98 | - }//end switch |
|
37 | + /** |
|
38 | + * Returns the lines where errors should occur. |
|
39 | + * |
|
40 | + * The key of the array should represent the line number and the value |
|
41 | + * should represent the number of errors that should occur on that line. |
|
42 | + * |
|
43 | + * @param string $testFile The name of the file being tested. |
|
44 | + * |
|
45 | + * @return array<int, int> |
|
46 | + */ |
|
47 | + public function getErrorList($testFile='DisallowSpaceIndentUnitTest.1.inc') |
|
48 | + { |
|
49 | + switch ($testFile) { |
|
50 | + case 'DisallowSpaceIndentUnitTest.1.inc': |
|
51 | + case 'DisallowSpaceIndentUnitTest.2.inc': |
|
52 | + return [ |
|
53 | + 5 => 1, |
|
54 | + 9 => 1, |
|
55 | + 15 => 1, |
|
56 | + 22 => 1, |
|
57 | + 24 => 1, |
|
58 | + 30 => 1, |
|
59 | + 35 => 1, |
|
60 | + 50 => 1, |
|
61 | + 55 => 1, |
|
62 | + 57 => 1, |
|
63 | + 58 => 1, |
|
64 | + 59 => 1, |
|
65 | + 60 => 1, |
|
66 | + 65 => 1, |
|
67 | + 66 => 1, |
|
68 | + 67 => 1, |
|
69 | + 68 => 1, |
|
70 | + 69 => 1, |
|
71 | + 70 => 1, |
|
72 | + 73 => 1, |
|
73 | + 77 => 1, |
|
74 | + 81 => 1, |
|
75 | + 104 => 1, |
|
76 | + 105 => 1, |
|
77 | + 106 => 1, |
|
78 | + 107 => 1, |
|
79 | + 108 => 1, |
|
80 | + 110 => 1, |
|
81 | + 111 => 1, |
|
82 | + 112 => 1, |
|
83 | + 114 => 1, |
|
84 | + 115 => 1, |
|
85 | + 117 => 1, |
|
86 | + 118 => 1, |
|
87 | + ]; |
|
88 | + break; |
|
89 | + case 'DisallowSpaceIndentUnitTest.js': |
|
90 | + return [3 => 1]; |
|
91 | + break; |
|
92 | + case 'DisallowSpaceIndentUnitTest.css': |
|
93 | + return [2 => 1]; |
|
94 | + break; |
|
95 | + default: |
|
96 | + return []; |
|
97 | + break; |
|
98 | + }//end switch |
|
99 | 99 | |
100 | - }//end getErrorList() |
|
100 | + }//end getErrorList() |
|
101 | 101 | |
102 | 102 | |
103 | - /** |
|
104 | - * Returns the lines where warnings should occur. |
|
105 | - * |
|
106 | - * The key of the array should represent the line number and the value |
|
107 | - * should represent the number of warnings that should occur on that line. |
|
108 | - * |
|
109 | - * @return array<int, int> |
|
110 | - */ |
|
111 | - public function getWarningList() |
|
112 | - { |
|
113 | - return []; |
|
103 | + /** |
|
104 | + * Returns the lines where warnings should occur. |
|
105 | + * |
|
106 | + * The key of the array should represent the line number and the value |
|
107 | + * should represent the number of warnings that should occur on that line. |
|
108 | + * |
|
109 | + * @return array<int, int> |
|
110 | + */ |
|
111 | + public function getWarningList() |
|
112 | + { |
|
113 | + return []; |
|
114 | 114 | |
115 | - }//end getWarningList() |
|
115 | + }//end getWarningList() |
|
116 | 116 | |
117 | 117 | |
118 | 118 | }//end class |
@@ -15,191 +15,191 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Get a list of CLI values to set before the file is tested. |
|
20 | - * |
|
21 | - * @param string $testFile The name of the file being tested. |
|
22 | - * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
23 | - * |
|
24 | - * @return void |
|
25 | - */ |
|
26 | - public function setCliValues($testFile, $config) |
|
27 | - { |
|
28 | - // Tab width setting is only needed for the tabbed file. |
|
29 | - if ($testFile === 'ScopeIndentUnitTest.2.inc') { |
|
30 | - $config->tabWidth = 4; |
|
31 | - } else { |
|
32 | - $config->tabWidth = 0; |
|
33 | - } |
|
34 | - |
|
35 | - }//end setCliValues() |
|
36 | - |
|
37 | - |
|
38 | - /** |
|
39 | - * Returns the lines where errors should occur. |
|
40 | - * |
|
41 | - * The key of the array should represent the line number and the value |
|
42 | - * should represent the number of errors that should occur on that line. |
|
43 | - * |
|
44 | - * @param string $testFile The name of the file being tested. |
|
45 | - * |
|
46 | - * @return array<int, int> |
|
47 | - */ |
|
48 | - public function getErrorList($testFile='ScopeIndentUnitTest.inc') |
|
49 | - { |
|
50 | - if ($testFile === 'ScopeIndentUnitTest.1.js') { |
|
51 | - return [ |
|
52 | - 6 => 1, |
|
53 | - 14 => 1, |
|
54 | - 21 => 1, |
|
55 | - 30 => 1, |
|
56 | - 32 => 1, |
|
57 | - 33 => 1, |
|
58 | - 34 => 1, |
|
59 | - 39 => 1, |
|
60 | - 42 => 1, |
|
61 | - 59 => 1, |
|
62 | - 60 => 1, |
|
63 | - 75 => 1, |
|
64 | - 120 => 1, |
|
65 | - 121 => 1, |
|
66 | - 122 => 1, |
|
67 | - 123 => 1, |
|
68 | - 141 => 1, |
|
69 | - 142 => 1, |
|
70 | - 155 => 1, |
|
71 | - 156 => 1, |
|
72 | - 168 => 1, |
|
73 | - 184 => 1, |
|
74 | - ]; |
|
75 | - }//end if |
|
76 | - |
|
77 | - if ($testFile === 'ScopeIndentUnitTest.3.inc') { |
|
78 | - return [ |
|
79 | - 6 => 1, |
|
80 | - 7 => 1, |
|
81 | - 10 => 1, |
|
82 | - ]; |
|
83 | - } |
|
84 | - |
|
85 | - if ($testFile === 'ScopeIndentUnitTest.4.inc') { |
|
86 | - return []; |
|
87 | - } |
|
88 | - |
|
89 | - return [ |
|
90 | - 7 => 1, |
|
91 | - 10 => 1, |
|
92 | - 13 => 1, |
|
93 | - 17 => 1, |
|
94 | - 20 => 1, |
|
95 | - 24 => 1, |
|
96 | - 25 => 1, |
|
97 | - 27 => 1, |
|
98 | - 28 => 1, |
|
99 | - 29 => 1, |
|
100 | - 30 => 1, |
|
101 | - 58 => 1, |
|
102 | - 123 => 1, |
|
103 | - 224 => 1, |
|
104 | - 225 => 1, |
|
105 | - 279 => 1, |
|
106 | - 280 => 1, |
|
107 | - 281 => 1, |
|
108 | - 282 => 1, |
|
109 | - 283 => 1, |
|
110 | - 284 => 1, |
|
111 | - 285 => 1, |
|
112 | - 286 => 1, |
|
113 | - 336 => 1, |
|
114 | - 349 => 1, |
|
115 | - 380 => 1, |
|
116 | - 386 => 1, |
|
117 | - 387 => 1, |
|
118 | - 388 => 1, |
|
119 | - 389 => 1, |
|
120 | - 390 => 1, |
|
121 | - 397 => 1, |
|
122 | - 419 => 1, |
|
123 | - 420 => 1, |
|
124 | - 465 => 1, |
|
125 | - 467 => 1, |
|
126 | - 472 => 1, |
|
127 | - 473 => 1, |
|
128 | - 474 => 1, |
|
129 | - 496 => 1, |
|
130 | - 498 => 1, |
|
131 | - 500 => 1, |
|
132 | - 524 => 1, |
|
133 | - 526 => 1, |
|
134 | - 544 => 1, |
|
135 | - 545 => 1, |
|
136 | - 546 => 1, |
|
137 | - 639 => 1, |
|
138 | - 660 => 1, |
|
139 | - 662 => 1, |
|
140 | - 802 => 1, |
|
141 | - 803 => 1, |
|
142 | - 823 => 1, |
|
143 | - 858 => 1, |
|
144 | - 879 => 1, |
|
145 | - 1163 => 1, |
|
146 | - 1197 => 1, |
|
147 | - 1198 => 1, |
|
148 | - 1259 => 1, |
|
149 | - 1264 => 1, |
|
150 | - 1265 => 1, |
|
151 | - 1266 => 1, |
|
152 | - 1269 => 1, |
|
153 | - 1272 => 1, |
|
154 | - 1273 => 1, |
|
155 | - 1274 => 1, |
|
156 | - 1275 => 1, |
|
157 | - 1276 => 1, |
|
158 | - 1277 => 1, |
|
159 | - 1280 => 1, |
|
160 | - 1281 => 1, |
|
161 | - 1282 => 1, |
|
162 | - 1284 => 1, |
|
163 | - 1285 => 1, |
|
164 | - 1288 => 1, |
|
165 | - 1289 => 1, |
|
166 | - 1290 => 1, |
|
167 | - 1292 => 1, |
|
168 | - 1293 => 1, |
|
169 | - 1310 => 1, |
|
170 | - 1312 => 1, |
|
171 | - 1327 => 1, |
|
172 | - 1328 => 1, |
|
173 | - 1329 => 1, |
|
174 | - 1330 => 1, |
|
175 | - 1331 => 1, |
|
176 | - 1332 => 1, |
|
177 | - 1335 => 1, |
|
178 | - 1340 => 1, |
|
179 | - 1342 => 1, |
|
180 | - 1345 => 1, |
|
181 | - 1411 => 1, |
|
182 | - 1412 => 1, |
|
183 | - 1413 => 1, |
|
184 | - 1414 => 1, |
|
185 | - ]; |
|
186 | - |
|
187 | - }//end getErrorList() |
|
188 | - |
|
189 | - |
|
190 | - /** |
|
191 | - * Returns the lines where warnings should occur. |
|
192 | - * |
|
193 | - * The key of the array should represent the line number and the value |
|
194 | - * should represent the number of warnings that should occur on that line. |
|
195 | - * |
|
196 | - * @return array<int, int> |
|
197 | - */ |
|
198 | - public function getWarningList() |
|
199 | - { |
|
200 | - return []; |
|
201 | - |
|
202 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Get a list of CLI values to set before the file is tested. |
|
20 | + * |
|
21 | + * @param string $testFile The name of the file being tested. |
|
22 | + * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
23 | + * |
|
24 | + * @return void |
|
25 | + */ |
|
26 | + public function setCliValues($testFile, $config) |
|
27 | + { |
|
28 | + // Tab width setting is only needed for the tabbed file. |
|
29 | + if ($testFile === 'ScopeIndentUnitTest.2.inc') { |
|
30 | + $config->tabWidth = 4; |
|
31 | + } else { |
|
32 | + $config->tabWidth = 0; |
|
33 | + } |
|
34 | + |
|
35 | + }//end setCliValues() |
|
36 | + |
|
37 | + |
|
38 | + /** |
|
39 | + * Returns the lines where errors should occur. |
|
40 | + * |
|
41 | + * The key of the array should represent the line number and the value |
|
42 | + * should represent the number of errors that should occur on that line. |
|
43 | + * |
|
44 | + * @param string $testFile The name of the file being tested. |
|
45 | + * |
|
46 | + * @return array<int, int> |
|
47 | + */ |
|
48 | + public function getErrorList($testFile='ScopeIndentUnitTest.inc') |
|
49 | + { |
|
50 | + if ($testFile === 'ScopeIndentUnitTest.1.js') { |
|
51 | + return [ |
|
52 | + 6 => 1, |
|
53 | + 14 => 1, |
|
54 | + 21 => 1, |
|
55 | + 30 => 1, |
|
56 | + 32 => 1, |
|
57 | + 33 => 1, |
|
58 | + 34 => 1, |
|
59 | + 39 => 1, |
|
60 | + 42 => 1, |
|
61 | + 59 => 1, |
|
62 | + 60 => 1, |
|
63 | + 75 => 1, |
|
64 | + 120 => 1, |
|
65 | + 121 => 1, |
|
66 | + 122 => 1, |
|
67 | + 123 => 1, |
|
68 | + 141 => 1, |
|
69 | + 142 => 1, |
|
70 | + 155 => 1, |
|
71 | + 156 => 1, |
|
72 | + 168 => 1, |
|
73 | + 184 => 1, |
|
74 | + ]; |
|
75 | + }//end if |
|
76 | + |
|
77 | + if ($testFile === 'ScopeIndentUnitTest.3.inc') { |
|
78 | + return [ |
|
79 | + 6 => 1, |
|
80 | + 7 => 1, |
|
81 | + 10 => 1, |
|
82 | + ]; |
|
83 | + } |
|
84 | + |
|
85 | + if ($testFile === 'ScopeIndentUnitTest.4.inc') { |
|
86 | + return []; |
|
87 | + } |
|
88 | + |
|
89 | + return [ |
|
90 | + 7 => 1, |
|
91 | + 10 => 1, |
|
92 | + 13 => 1, |
|
93 | + 17 => 1, |
|
94 | + 20 => 1, |
|
95 | + 24 => 1, |
|
96 | + 25 => 1, |
|
97 | + 27 => 1, |
|
98 | + 28 => 1, |
|
99 | + 29 => 1, |
|
100 | + 30 => 1, |
|
101 | + 58 => 1, |
|
102 | + 123 => 1, |
|
103 | + 224 => 1, |
|
104 | + 225 => 1, |
|
105 | + 279 => 1, |
|
106 | + 280 => 1, |
|
107 | + 281 => 1, |
|
108 | + 282 => 1, |
|
109 | + 283 => 1, |
|
110 | + 284 => 1, |
|
111 | + 285 => 1, |
|
112 | + 286 => 1, |
|
113 | + 336 => 1, |
|
114 | + 349 => 1, |
|
115 | + 380 => 1, |
|
116 | + 386 => 1, |
|
117 | + 387 => 1, |
|
118 | + 388 => 1, |
|
119 | + 389 => 1, |
|
120 | + 390 => 1, |
|
121 | + 397 => 1, |
|
122 | + 419 => 1, |
|
123 | + 420 => 1, |
|
124 | + 465 => 1, |
|
125 | + 467 => 1, |
|
126 | + 472 => 1, |
|
127 | + 473 => 1, |
|
128 | + 474 => 1, |
|
129 | + 496 => 1, |
|
130 | + 498 => 1, |
|
131 | + 500 => 1, |
|
132 | + 524 => 1, |
|
133 | + 526 => 1, |
|
134 | + 544 => 1, |
|
135 | + 545 => 1, |
|
136 | + 546 => 1, |
|
137 | + 639 => 1, |
|
138 | + 660 => 1, |
|
139 | + 662 => 1, |
|
140 | + 802 => 1, |
|
141 | + 803 => 1, |
|
142 | + 823 => 1, |
|
143 | + 858 => 1, |
|
144 | + 879 => 1, |
|
145 | + 1163 => 1, |
|
146 | + 1197 => 1, |
|
147 | + 1198 => 1, |
|
148 | + 1259 => 1, |
|
149 | + 1264 => 1, |
|
150 | + 1265 => 1, |
|
151 | + 1266 => 1, |
|
152 | + 1269 => 1, |
|
153 | + 1272 => 1, |
|
154 | + 1273 => 1, |
|
155 | + 1274 => 1, |
|
156 | + 1275 => 1, |
|
157 | + 1276 => 1, |
|
158 | + 1277 => 1, |
|
159 | + 1280 => 1, |
|
160 | + 1281 => 1, |
|
161 | + 1282 => 1, |
|
162 | + 1284 => 1, |
|
163 | + 1285 => 1, |
|
164 | + 1288 => 1, |
|
165 | + 1289 => 1, |
|
166 | + 1290 => 1, |
|
167 | + 1292 => 1, |
|
168 | + 1293 => 1, |
|
169 | + 1310 => 1, |
|
170 | + 1312 => 1, |
|
171 | + 1327 => 1, |
|
172 | + 1328 => 1, |
|
173 | + 1329 => 1, |
|
174 | + 1330 => 1, |
|
175 | + 1331 => 1, |
|
176 | + 1332 => 1, |
|
177 | + 1335 => 1, |
|
178 | + 1340 => 1, |
|
179 | + 1342 => 1, |
|
180 | + 1345 => 1, |
|
181 | + 1411 => 1, |
|
182 | + 1412 => 1, |
|
183 | + 1413 => 1, |
|
184 | + 1414 => 1, |
|
185 | + ]; |
|
186 | + |
|
187 | + }//end getErrorList() |
|
188 | + |
|
189 | + |
|
190 | + /** |
|
191 | + * Returns the lines where warnings should occur. |
|
192 | + * |
|
193 | + * The key of the array should represent the line number and the value |
|
194 | + * should represent the number of warnings that should occur on that line. |
|
195 | + * |
|
196 | + * @return array<int, int> |
|
197 | + */ |
|
198 | + public function getWarningList() |
|
199 | + { |
|
200 | + return []; |
|
201 | + |
|
202 | + }//end getWarningList() |
|
203 | 203 | |
204 | 204 | |
205 | 205 | }//end class |