Completed
Branch BUG/gql-query-limits (8356ca)
by
unknown
23:45 queued 16:15
created
src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.php 3 patches
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -15,70 +15,70 @@
 block discarded – undo
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
-     * @param string $testFile The name of the file being tested.
25
-     *
26
-     * @return array<int, int>
27
-     */
28
-    public function getErrorList($testFile='LowerCaseConstantUnitTest.inc')
29
-    {
30
-        switch ($testFile) {
31
-        case 'LowerCaseConstantUnitTest.inc':
32
-            return [
33
-                7  => 1,
34
-                10 => 1,
35
-                15 => 1,
36
-                16 => 1,
37
-                23 => 1,
38
-                26 => 1,
39
-                31 => 1,
40
-                32 => 1,
41
-                39 => 1,
42
-                42 => 1,
43
-                47 => 1,
44
-                48 => 1,
45
-                70 => 1,
46
-                71 => 1,
47
-            ];
48
-        break;
49
-        case 'LowerCaseConstantUnitTest.js':
50
-            return [
51
-                2  => 1,
52
-                3  => 1,
53
-                4  => 1,
54
-                7  => 1,
55
-                8  => 1,
56
-                12 => 1,
57
-                13 => 1,
58
-                14 => 1,
59
-            ];
60
-            break;
61
-        default:
62
-            return [];
63
-            break;
64
-        }//end switch
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
+	 * @param string $testFile The name of the file being tested.
25
+	 *
26
+	 * @return array<int, int>
27
+	 */
28
+	public function getErrorList($testFile='LowerCaseConstantUnitTest.inc')
29
+	{
30
+		switch ($testFile) {
31
+		case 'LowerCaseConstantUnitTest.inc':
32
+			return [
33
+				7  => 1,
34
+				10 => 1,
35
+				15 => 1,
36
+				16 => 1,
37
+				23 => 1,
38
+				26 => 1,
39
+				31 => 1,
40
+				32 => 1,
41
+				39 => 1,
42
+				42 => 1,
43
+				47 => 1,
44
+				48 => 1,
45
+				70 => 1,
46
+				71 => 1,
47
+			];
48
+		break;
49
+		case 'LowerCaseConstantUnitTest.js':
50
+			return [
51
+				2  => 1,
52
+				3  => 1,
53
+				4  => 1,
54
+				7  => 1,
55
+				8  => 1,
56
+				12 => 1,
57
+				13 => 1,
58
+				14 => 1,
59
+			];
60
+			break;
61
+		default:
62
+			return [];
63
+			break;
64
+		}//end switch
65 65
 
66
-    }//end getErrorList()
66
+	}//end getErrorList()
67 67
 
68 68
 
69
-    /**
70
-     * Returns the lines where warnings should occur.
71
-     *
72
-     * The key of the array should represent the line number and the value
73
-     * should represent the number of warnings that should occur on that line.
74
-     *
75
-     * @return array<int, int>
76
-     */
77
-    public function getWarningList()
78
-    {
79
-        return [];
69
+	/**
70
+	 * Returns the lines where warnings should occur.
71
+	 *
72
+	 * The key of the array should represent the line number and the value
73
+	 * should represent the number of warnings that should occur on that line.
74
+	 *
75
+	 * @return array<int, int>
76
+	 */
77
+	public function getWarningList()
78
+	{
79
+		return [];
80 80
 
81
-    }//end getWarningList()
81
+	}//end getWarningList()
82 82
 
83 83
 
84 84
 }//end class
Please login to merge, or discard this patch.
Switch Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -28,39 +28,39 @@
 block discarded – undo
28 28
     public function getErrorList($testFile='LowerCaseConstantUnitTest.inc')
29 29
     {
30 30
         switch ($testFile) {
31
-        case 'LowerCaseConstantUnitTest.inc':
32
-            return [
33
-                7  => 1,
34
-                10 => 1,
35
-                15 => 1,
36
-                16 => 1,
37
-                23 => 1,
38
-                26 => 1,
39
-                31 => 1,
40
-                32 => 1,
41
-                39 => 1,
42
-                42 => 1,
43
-                47 => 1,
44
-                48 => 1,
45
-                70 => 1,
46
-                71 => 1,
47
-            ];
48
-        break;
49
-        case 'LowerCaseConstantUnitTest.js':
50
-            return [
51
-                2  => 1,
52
-                3  => 1,
53
-                4  => 1,
54
-                7  => 1,
55
-                8  => 1,
56
-                12 => 1,
57
-                13 => 1,
58
-                14 => 1,
59
-            ];
60
-            break;
61
-        default:
62
-            return [];
63
-            break;
31
+        	case 'LowerCaseConstantUnitTest.inc':
32
+            	return [
33
+                	7  => 1,
34
+                	10 => 1,
35
+                	15 => 1,
36
+                	16 => 1,
37
+                	23 => 1,
38
+                	26 => 1,
39
+                	31 => 1,
40
+                	32 => 1,
41
+                	39 => 1,
42
+                	42 => 1,
43
+                	47 => 1,
44
+                	48 => 1,
45
+                	70 => 1,
46
+                	71 => 1,
47
+            	];
48
+        	break;
49
+        	case 'LowerCaseConstantUnitTest.js':
50
+            	return [
51
+                	2  => 1,
52
+                	3  => 1,
53
+                	4  => 1,
54
+                	7  => 1,
55
+                	8  => 1,
56
+                	12 => 1,
57
+                	13 => 1,
58
+                	14 => 1,
59
+            	];
60
+            	break;
61
+        	default:
62
+            	return [];
63
+            	break;
64 64
         }//end switch
65 65
 
66 66
     }//end getErrorList()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      *
26 26
      * @return array<int, int>
27 27
      */
28
-    public function getErrorList($testFile='LowerCaseConstantUnitTest.inc')
28
+    public function getErrorList($testFile = 'LowerCaseConstantUnitTest.inc')
29 29
     {
30 30
         switch ($testFile) {
31 31
         case 'LowerCaseConstantUnitTest.inc':
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/PHP/DisallowShortOpenTagUnitTest.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      *
49 49
      * @return array<int, int>
50 50
      */
51
-    public function getErrorList($testFile='')
51
+    public function getErrorList($testFile = '')
52 52
     {
53 53
         switch ($testFile) {
54 54
         case 'DisallowShortOpenTagUnitTest.1.inc':
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      *
90 90
      * @return array<int, int>
91 91
      */
92
-    public function getWarningList($testFile='')
92
+    public function getWarningList($testFile = '')
93 93
     {
94 94
         switch ($testFile) {
95 95
         case 'DisallowShortOpenTagUnitTest.1.inc':
Please login to merge, or discard this patch.
Indentation   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -15,89 +15,89 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Get a list of all test files to check.
20
-     *
21
-     * @param string $testFileBase The base path that the unit tests files will have.
22
-     *
23
-     * @return string[]
24
-     */
25
-    protected function getTestFiles($testFileBase)
26
-    {
27
-        $testFiles = [$testFileBase.'1.inc'];
28
-
29
-        $option = (bool) ini_get('short_open_tag');
30
-        if ($option === true) {
31
-            $testFiles[] = $testFileBase.'2.inc';
32
-        } else {
33
-            $testFiles[] = $testFileBase.'3.inc';
34
-        }
35
-
36
-        return $testFiles;
37
-
38
-    }//end getTestFiles()
39
-
40
-
41
-    /**
42
-     * Returns the lines where errors should occur.
43
-     *
44
-     * The key of the array should represent the line number and the value
45
-     * should represent the number of errors that should occur on that line.
46
-     *
47
-     * @param string $testFile The name of the file being tested.
48
-     *
49
-     * @return array<int, int>
50
-     */
51
-    public function getErrorList($testFile='')
52
-    {
53
-        switch ($testFile) {
54
-        case 'DisallowShortOpenTagUnitTest.1.inc':
55
-            return [
56
-                5  => 1,
57
-                6  => 1,
58
-                7  => 1,
59
-                10 => 1,
60
-            ];
61
-        case 'DisallowShortOpenTagUnitTest.2.inc':
62
-            return [
63
-                2 => 1,
64
-                3 => 1,
65
-                4 => 1,
66
-                7 => 1,
67
-            ];
68
-        default:
69
-            return [];
70
-        }//end switch
71
-
72
-    }//end getErrorList()
73
-
74
-
75
-    /**
76
-     * Returns the lines where warnings should occur.
77
-     *
78
-     * The key of the array should represent the line number and the value
79
-     * should represent the number of warnings that should occur on that line.
80
-     *
81
-     * @param string $testFile The name of the file being tested.
82
-     *
83
-     * @return array<int, int>
84
-     */
85
-    public function getWarningList($testFile='')
86
-    {
87
-        switch ($testFile) {
88
-        case 'DisallowShortOpenTagUnitTest.1.inc':
89
-            return [];
90
-        case 'DisallowShortOpenTagUnitTest.3.inc':
91
-            return [
92
-                3  => 1,
93
-                6  => 1,
94
-                11 => 1,
95
-            ];
96
-        default:
97
-            return [];
98
-        }//end switch
99
-
100
-    }//end getWarningList()
18
+	/**
19
+	 * Get a list of all test files to check.
20
+	 *
21
+	 * @param string $testFileBase The base path that the unit tests files will have.
22
+	 *
23
+	 * @return string[]
24
+	 */
25
+	protected function getTestFiles($testFileBase)
26
+	{
27
+		$testFiles = [$testFileBase.'1.inc'];
28
+
29
+		$option = (bool) ini_get('short_open_tag');
30
+		if ($option === true) {
31
+			$testFiles[] = $testFileBase.'2.inc';
32
+		} else {
33
+			$testFiles[] = $testFileBase.'3.inc';
34
+		}
35
+
36
+		return $testFiles;
37
+
38
+	}//end getTestFiles()
39
+
40
+
41
+	/**
42
+	 * Returns the lines where errors should occur.
43
+	 *
44
+	 * The key of the array should represent the line number and the value
45
+	 * should represent the number of errors that should occur on that line.
46
+	 *
47
+	 * @param string $testFile The name of the file being tested.
48
+	 *
49
+	 * @return array<int, int>
50
+	 */
51
+	public function getErrorList($testFile='')
52
+	{
53
+		switch ($testFile) {
54
+		case 'DisallowShortOpenTagUnitTest.1.inc':
55
+			return [
56
+				5  => 1,
57
+				6  => 1,
58
+				7  => 1,
59
+				10 => 1,
60
+			];
61
+		case 'DisallowShortOpenTagUnitTest.2.inc':
62
+			return [
63
+				2 => 1,
64
+				3 => 1,
65
+				4 => 1,
66
+				7 => 1,
67
+			];
68
+		default:
69
+			return [];
70
+		}//end switch
71
+
72
+	}//end getErrorList()
73
+
74
+
75
+	/**
76
+	 * Returns the lines where warnings should occur.
77
+	 *
78
+	 * The key of the array should represent the line number and the value
79
+	 * should represent the number of warnings that should occur on that line.
80
+	 *
81
+	 * @param string $testFile The name of the file being tested.
82
+	 *
83
+	 * @return array<int, int>
84
+	 */
85
+	public function getWarningList($testFile='')
86
+	{
87
+		switch ($testFile) {
88
+		case 'DisallowShortOpenTagUnitTest.1.inc':
89
+			return [];
90
+		case 'DisallowShortOpenTagUnitTest.3.inc':
91
+			return [
92
+				3  => 1,
93
+				6  => 1,
94
+				11 => 1,
95
+			];
96
+		default:
97
+			return [];
98
+		}//end switch
99
+
100
+	}//end getWarningList()
101 101
 
102 102
 
103 103
 }//end class
Please login to merge, or discard this patch.
Switch Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -51,22 +51,22 @@  discard block
 block discarded – undo
51 51
     public function getErrorList($testFile='')
52 52
     {
53 53
         switch ($testFile) {
54
-        case 'DisallowShortOpenTagUnitTest.1.inc':
55
-            return [
56
-                5  => 1,
57
-                6  => 1,
58
-                7  => 1,
59
-                10 => 1,
60
-            ];
61
-        case 'DisallowShortOpenTagUnitTest.2.inc':
62
-            return [
63
-                2 => 1,
64
-                3 => 1,
65
-                4 => 1,
66
-                7 => 1,
67
-            ];
68
-        default:
69
-            return [];
54
+        	case 'DisallowShortOpenTagUnitTest.1.inc':
55
+            	return [
56
+                	5  => 1,
57
+                	6  => 1,
58
+                	7  => 1,
59
+                	10 => 1,
60
+            	];
61
+        	case 'DisallowShortOpenTagUnitTest.2.inc':
62
+            	return [
63
+                	2 => 1,
64
+                	3 => 1,
65
+                	4 => 1,
66
+                	7 => 1,
67
+            	];
68
+        	default:
69
+            	return [];
70 70
         }//end switch
71 71
 
72 72
     }//end getErrorList()
@@ -85,16 +85,16 @@  discard block
 block discarded – undo
85 85
     public function getWarningList($testFile='')
86 86
     {
87 87
         switch ($testFile) {
88
-        case 'DisallowShortOpenTagUnitTest.1.inc':
89
-            return [];
90
-        case 'DisallowShortOpenTagUnitTest.3.inc':
91
-            return [
92
-                3  => 1,
93
-                6  => 1,
94
-                11 => 1,
95
-            ];
96
-        default:
97
-            return [];
88
+        	case 'DisallowShortOpenTagUnitTest.1.inc':
89
+            	return [];
90
+        	case 'DisallowShortOpenTagUnitTest.3.inc':
91
+            	return [
92
+                	3  => 1,
93
+                	6  => 1,
94
+                	11 => 1,
95
+            	];
96
+        	default:
97
+            	return [];
98 98
         }//end switch
99 99
 
100 100
     }//end getWarningList()
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/PHP/ForbiddenFunctionsUnitTest.inc 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 delete($filepath);
5 5
 unset($filepath);
6 6
 $size = \sizeof($array);
7
-$size = \my\ns\sizeof('abc');($array);
7
+$size = \my\ns\sizeof('abc'); ($array);
8 8
 
9 9
 // No errors thrown for class methods.
10 10
 $size = MyClass::sizeof($array);
Please login to merge, or discard this patch.
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -24,27 +24,27 @@
 block discarded – undo
24 24
 
25 25
 trait DelProvider {
26 26
   public function delete() {
27
-    //irrelevant
27
+	//irrelevant
28 28
   }
29 29
 }
30 30
 
31 31
 class LeftSideTest {
32
-    use DelProvider {
33
-        delete as protected unsetter;
34
-    }
32
+	use DelProvider {
33
+		delete as protected unsetter;
34
+	}
35 35
 }
36 36
 
37 37
 class RightSideTest {
38
-    use DelProvider {
39
-        delete as delete;
40
-    }
38
+	use DelProvider {
39
+		delete as delete;
40
+	}
41 41
 }
42 42
 
43 43
 class RightSideVisTest {
44
-    use DelProvider {
45
-        delete as protected delete;
46
-        DelProvider::delete insteadof delete;
47
-    }
44
+	use DelProvider {
45
+		delete as protected delete;
46
+		DelProvider::delete insteadof delete;
47
+	}
48 48
 }
49 49
 
50 50
 namespace Something\sizeof;
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/PHP/LowerCaseConstantUnitTest.inc 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
 use Something\True;
62 62
 class MyClass
63 63
 {
64
-    public function myFunction()
65
-    {
66
-        $var = array('foo' => new True());
67
-    }
64
+	public function myFunction()
65
+	{
66
+		$var = array('foo' => new True());
67
+	}
68 68
 }
69 69
 
70 70
 $x = $f?FALSE:true;
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 
73 73
 class MyClass
74 74
 {
75
-    // Spice things up a little.
76
-    const TRUE = false;
75
+	// Spice things up a little.
76
+	const TRUE = false;
77 77
 }
78 78
 
79 79
 var_dump(MyClass::TRUE);
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // True
4
-function myFunction($arg1, $arg2=true)
4
+function myFunction($arg1, $arg2 = true)
5 5
 {
6 6
 }
7
-function myFunction($arg1, $arg2=TRUE)
7
+function myFunction($arg1, $arg2 = TRUE)
8 8
 {
9 9
 }
10
-function myFunction($arg1, $arg2=True)
10
+function myFunction($arg1, $arg2 = True)
11 11
 {
12 12
 }
13 13
 
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
 
18 18
 
19 19
 // False
20
-function myFunction($arg1, $arg2=false)
20
+function myFunction($arg1, $arg2 = false)
21 21
 {
22 22
 }
23
-function myFunction($arg1, $arg2=FALSE)
23
+function myFunction($arg1, $arg2 = FALSE)
24 24
 {
25 25
 }
26
-function myFunction($arg1, $arg2=False)
26
+function myFunction($arg1, $arg2 = False)
27 27
 {
28 28
 }
29 29
 
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
 
34 34
 
35 35
 // Null
36
-function myFunction($arg1, $arg2=null)
36
+function myFunction($arg1, $arg2 = null)
37 37
 {
38 38
 }
39
-function myFunction($arg1, $arg2=NULL)
39
+function myFunction($arg1, $arg2 = NULL)
40 40
 {
41 41
 }
42
-function myFunction($arg1, $arg2=Null)
42
+function myFunction($arg1, $arg2 = Null)
43 43
 {
44 44
 }
45 45
 
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
     }
68 68
 }
69 69
 
70
-$x = $f?FALSE:true;
71
-$x = $f? FALSE:true;
70
+$x = $f ?FALSE:true;
71
+$x = $f ? FALSE:true;
72 72
 
73 73
 class MyClass
74 74
 {
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.inc 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
 use Something\True;
62 62
 class MyClass
63 63
 {
64
-    public function myFunction()
65
-    {
66
-        $var = array('foo' => new True());
67
-    }
64
+	public function myFunction()
65
+	{
66
+		$var = array('foo' => new True());
67
+	}
68 68
 }
69 69
 
70 70
 $x = $f?false:TRUE;
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 
73 73
 class MyClass
74 74
 {
75
-    // Spice things up a little.
76
-    const true = FALSE;
75
+	// Spice things up a little.
76
+	const true = FALSE;
77 77
 }
78 78
 
79 79
 var_dump(MyClass::true);
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // True
4
-function myFunction($arg1, $arg2=TRUE)
4
+function myFunction($arg1, $arg2 = TRUE)
5 5
 {
6 6
 }
7
-function myFunction($arg1, $arg2=true)
7
+function myFunction($arg1, $arg2 = true)
8 8
 {
9 9
 }
10
-function myFunction($arg1, $arg2=True)
10
+function myFunction($arg1, $arg2 = True)
11 11
 {
12 12
 }
13 13
 
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
 
18 18
 
19 19
 // False
20
-function myFunction($arg1, $arg2=FALSE)
20
+function myFunction($arg1, $arg2 = FALSE)
21 21
 {
22 22
 }
23
-function myFunction($arg1, $arg2=false)
23
+function myFunction($arg1, $arg2 = false)
24 24
 {
25 25
 }
26
-function myFunction($arg1, $arg2=False)
26
+function myFunction($arg1, $arg2 = False)
27 27
 {
28 28
 }
29 29
 
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
 
34 34
 
35 35
 // Null
36
-function myFunction($arg1, $arg2=NULL)
36
+function myFunction($arg1, $arg2 = NULL)
37 37
 {
38 38
 }
39
-function myFunction($arg1, $arg2=null)
39
+function myFunction($arg1, $arg2 = null)
40 40
 {
41 41
 }
42
-function myFunction($arg1, $arg2=Null)
42
+function myFunction($arg1, $arg2 = Null)
43 43
 {
44 44
 }
45 45
 
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
     }
68 68
 }
69 69
 
70
-$x = $f?false:TRUE;
71
-$x = $f? false:TRUE;
70
+$x = $f ?false:TRUE;
71
+$x = $f ? false:TRUE;
72 72
 
73 73
 class MyClass
74 74
 {
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.php 3 patches
Switch Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -67,22 +67,22 @@
 block discarded – undo
67 67
     public function getErrorList($testFile='')
68 68
     {
69 69
         switch ($testFile) {
70
-        case 'DisallowAlternativePHPTagsUnitTest.1.inc':
71
-            return [
72
-                4  => 1,
73
-                7  => 1,
74
-                8  => 1,
75
-                11 => 1,
76
-            ];
77
-        case 'DisallowAlternativePHPTagsUnitTest.2.inc':
78
-            return [
79
-                2 => 1,
80
-                3 => 1,
81
-                4 => 1,
82
-                5 => 1,
83
-            ];
84
-        default:
85
-            return [];
70
+        	case 'DisallowAlternativePHPTagsUnitTest.1.inc':
71
+            	return [
72
+                	4  => 1,
73
+                	7  => 1,
74
+                	8  => 1,
75
+                	11 => 1,
76
+            	];
77
+        	case 'DisallowAlternativePHPTagsUnitTest.2.inc':
78
+            	return [
79
+                	2 => 1,
80
+                	3 => 1,
81
+                	4 => 1,
82
+                	5 => 1,
83
+            	];
84
+        	default:
85
+            	return [];
86 86
         }//end switch
87 87
 
88 88
     }//end getErrorList()
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      *
65 65
      * @return array<int, int>
66 66
      */
67
-    public function getErrorList($testFile='')
67
+    public function getErrorList($testFile = '')
68 68
     {
69 69
         switch ($testFile) {
70 70
         case 'DisallowAlternativePHPTagsUnitTest.1.inc':
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      *
99 99
      * @return array<int, int>
100 100
      */
101
-    public function getWarningList($testFile='')
101
+    public function getWarningList($testFile = '')
102 102
     {
103 103
         if ($testFile === 'DisallowAlternativePHPTagsUnitTest.3.inc') {
104 104
             return [
Please login to merge, or discard this patch.
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -15,91 +15,91 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Get a list of all test files to check.
20
-     *
21
-     * @param string $testFileBase The base path that the unit tests files will have.
22
-     *
23
-     * @return string[]
24
-     */
25
-    protected function getTestFiles($testFileBase)
26
-    {
27
-        $testFiles = [$testFileBase.'1.inc'];
28
-
29
-        $aspTags = false;
30
-        if (PHP_VERSION_ID < 70000) {
31
-            $aspTags = (bool) ini_get('asp_tags');
32
-        }
33
-
34
-        if ($aspTags === true) {
35
-            $testFiles[] = $testFileBase.'2.inc';
36
-        } else {
37
-            $testFiles[] = $testFileBase.'3.inc';
38
-        }
39
-
40
-        return $testFiles;
41
-
42
-    }//end getTestFiles()
43
-
44
-
45
-    /**
46
-     * Returns the lines where errors should occur.
47
-     *
48
-     * The key of the array should represent the line number and the value
49
-     * should represent the number of errors that should occur on that line.
50
-     *
51
-     * @param string $testFile The name of the file being tested.
52
-     *
53
-     * @return array<int, int>
54
-     */
55
-    public function getErrorList($testFile='')
56
-    {
57
-        switch ($testFile) {
58
-        case 'DisallowAlternativePHPTagsUnitTest.1.inc':
59
-            return [
60
-                4  => 1,
61
-                7  => 1,
62
-                8  => 1,
63
-                11 => 1,
64
-            ];
65
-        case 'DisallowAlternativePHPTagsUnitTest.2.inc':
66
-            return [
67
-                2 => 1,
68
-                3 => 1,
69
-                4 => 1,
70
-                5 => 1,
71
-            ];
72
-        default:
73
-            return [];
74
-        }//end switch
75
-
76
-    }//end getErrorList()
77
-
78
-
79
-    /**
80
-     * Returns the lines where warnings should occur.
81
-     *
82
-     * The key of the array should represent the line number and the value
83
-     * should represent the number of warnings that should occur on that line.
84
-     *
85
-     * @param string $testFile The name of the file being tested.
86
-     *
87
-     * @return array<int, int>
88
-     */
89
-    public function getWarningList($testFile='')
90
-    {
91
-        if ($testFile === 'DisallowAlternativePHPTagsUnitTest.3.inc') {
92
-            return [
93
-                3 => 1,
94
-                4 => 1,
95
-                5 => 1,
96
-                6 => 1,
97
-            ];
98
-        }
99
-
100
-        return [];
101
-
102
-    }//end getWarningList()
18
+	/**
19
+	 * Get a list of all test files to check.
20
+	 *
21
+	 * @param string $testFileBase The base path that the unit tests files will have.
22
+	 *
23
+	 * @return string[]
24
+	 */
25
+	protected function getTestFiles($testFileBase)
26
+	{
27
+		$testFiles = [$testFileBase.'1.inc'];
28
+
29
+		$aspTags = false;
30
+		if (PHP_VERSION_ID < 70000) {
31
+			$aspTags = (bool) ini_get('asp_tags');
32
+		}
33
+
34
+		if ($aspTags === true) {
35
+			$testFiles[] = $testFileBase.'2.inc';
36
+		} else {
37
+			$testFiles[] = $testFileBase.'3.inc';
38
+		}
39
+
40
+		return $testFiles;
41
+
42
+	}//end getTestFiles()
43
+
44
+
45
+	/**
46
+	 * Returns the lines where errors should occur.
47
+	 *
48
+	 * The key of the array should represent the line number and the value
49
+	 * should represent the number of errors that should occur on that line.
50
+	 *
51
+	 * @param string $testFile The name of the file being tested.
52
+	 *
53
+	 * @return array<int, int>
54
+	 */
55
+	public function getErrorList($testFile='')
56
+	{
57
+		switch ($testFile) {
58
+		case 'DisallowAlternativePHPTagsUnitTest.1.inc':
59
+			return [
60
+				4  => 1,
61
+				7  => 1,
62
+				8  => 1,
63
+				11 => 1,
64
+			];
65
+		case 'DisallowAlternativePHPTagsUnitTest.2.inc':
66
+			return [
67
+				2 => 1,
68
+				3 => 1,
69
+				4 => 1,
70
+				5 => 1,
71
+			];
72
+		default:
73
+			return [];
74
+		}//end switch
75
+
76
+	}//end getErrorList()
77
+
78
+
79
+	/**
80
+	 * Returns the lines where warnings should occur.
81
+	 *
82
+	 * The key of the array should represent the line number and the value
83
+	 * should represent the number of warnings that should occur on that line.
84
+	 *
85
+	 * @param string $testFile The name of the file being tested.
86
+	 *
87
+	 * @return array<int, int>
88
+	 */
89
+	public function getWarningList($testFile='')
90
+	{
91
+		if ($testFile === 'DisallowAlternativePHPTagsUnitTest.3.inc') {
92
+			return [
93
+				3 => 1,
94
+				4 => 1,
95
+				5 => 1,
96
+				6 => 1,
97
+			];
98
+		}
99
+
100
+		return [];
101
+
102
+	}//end getWarningList()
103 103
 
104 104
 
105 105
 }//end class
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Generic/Tests/PHP/DiscourageGotoUnitTest.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -15,39 +15,39 @@
 block discarded – undo
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
-        return [];
29
-
30
-    }//end getErrorList()
31
-
32
-
33
-    /**
34
-     * Returns the lines where warnings should occur.
35
-     *
36
-     * The key of the array should represent the line number and the value
37
-     * should represent the number of warnings that should occur on that line.
38
-     *
39
-     * @return array<int, int>
40
-     */
41
-    public function getWarningList()
42
-    {
43
-        return [
44
-            3  => 1,
45
-            6  => 1,
46
-            11 => 1,
47
-            16 => 1,
48
-        ];
49
-
50
-    }//end getWarningList()
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
+		return [];
29
+
30
+	}//end getErrorList()
31
+
32
+
33
+	/**
34
+	 * Returns the lines where warnings should occur.
35
+	 *
36
+	 * The key of the array should represent the line number and the value
37
+	 * should represent the number of warnings that should occur on that line.
38
+	 *
39
+	 * @return array<int, int>
40
+	 */
41
+	public function getWarningList()
42
+	{
43
+		return [
44
+			3  => 1,
45
+			6  => 1,
46
+			11 => 1,
47
+			16 => 1,
48
+		];
49
+
50
+	}//end getWarningList()
51 51
 
52 52
 
53 53
 }//end class
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Generic/Tests/PHP/SAPIUsageUnitTest.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -15,34 +15,34 @@
 block discarded – undo
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
-        return [2 => 1];
29
-
30
-    }//end getErrorList()
31
-
32
-
33
-    /**
34
-     * Returns the lines where warnings should occur.
35
-     *
36
-     * The key of the array should represent the line number and the value
37
-     * should represent the number of warnings that should occur on that line.
38
-     *
39
-     * @return array<int, int>
40
-     */
41
-    public function getWarningList()
42
-    {
43
-        return [];
44
-
45
-    }//end getWarningList()
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
+		return [2 => 1];
29
+
30
+	}//end getErrorList()
31
+
32
+
33
+	/**
34
+	 * Returns the lines where warnings should occur.
35
+	 *
36
+	 * The key of the array should represent the line number and the value
37
+	 * should represent the number of warnings that should occur on that line.
38
+	 *
39
+	 * @return array<int, int>
40
+	 */
41
+	public function getWarningList()
42
+	{
43
+		return [];
44
+
45
+	}//end getWarningList()
46 46
 
47 47
 
48 48
 }//end class
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/PHP/ForbiddenFunctionsUnitTest.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -15,40 +15,40 @@
 block discarded – undo
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
-            2 => 1,
30
-            4 => 1,
31
-            6 => 1,
32
-        ];
33
-
34
-        return $errors;
35
-
36
-    }//end getErrorList()
37
-
38
-
39
-    /**
40
-     * Returns the lines where warnings should occur.
41
-     *
42
-     * The key of the array should represent the line number and the value
43
-     * should represent the number of warnings that should occur on that line.
44
-     *
45
-     * @return array<int, int>
46
-     */
47
-    public function getWarningList()
48
-    {
49
-        return [];
50
-
51
-    }//end getWarningList()
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
+			2 => 1,
30
+			4 => 1,
31
+			6 => 1,
32
+		];
33
+
34
+		return $errors;
35
+
36
+	}//end getErrorList()
37
+
38
+
39
+	/**
40
+	 * Returns the lines where warnings should occur.
41
+	 *
42
+	 * The key of the array should represent the line number and the value
43
+	 * should represent the number of warnings that should occur on that line.
44
+	 *
45
+	 * @return array<int, int>
46
+	 */
47
+	public function getWarningList()
48
+	{
49
+		return [];
50
+
51
+	}//end getWarningList()
52 52
 
53 53
 
54 54
 }//end class
Please login to merge, or discard this patch.