Completed
Pull Request — develop (#1492)
by Zack
17:43
created
src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@
 block discarded – undo
17 17
 const PRIVATE;
18 18
 HttpStatus::CONTINUE;
19 19
 $c = Function ($f) {
20
-    Yield $f;
21
-    Yield From fun();
20
+	Yield $f;
21
+	Yield From fun();
22 22
 };
23 23
 class X extends Y {
24
-    public function m() {
25
-        Parent::m();
26
-    }
27
-    public function n() {
28
-        Self::n();
29
-    }
24
+	public function m() {
25
+		Parent::m();
26
+	}
27
+	public function n() {
28
+		Self::n();
29
+	}
30 30
 }
31 31
 function
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,20 +3,20 @@
 block discarded – undo
3 3
 class Something extends SomethingElse implements Whatever {}
4 4
 abstract public private protected function whatever() {}
5 5
 const array();
6
-foreach ($var as $var) { exit; }
7
-if ($a and $b or $c xor $d) { die; } elseif( $var ) { } else {}
6
+foreach ( $var as $var ) { exit; }
7
+if ( $a and $b or $c xor $d ) { die; } elseif ( $var ) { } else {}
8 8
 goto a;
9 9
 
10 10
 Class Something EXTENDS SomethingElse implementS Whatever {}
11 11
 Abstract Public Private Protected function whatever() {}
12 12
 CONST array();
13
-ForEach ($var As $var) { Exit; }
14
-If ($a AND $b OR $c XOR $d) { Die; } ElseIf( $var ) { } Else {}
13
+ForEach ( $var As $var ) { Exit; }
14
+If ( $a AND $b OR $c XOR $d ) { Die; } ElseIf ( $var ) { } Else {}
15 15
 GOTO a;
16
-$b = function (Array $a) {};
16
+$b = function( Array $a ) {};
17 17
 const PRIVATE;
18 18
 HttpStatus::CONTINUE;
19
-$c = Function ($f) {
19
+$c = Function( $f ) {
20 20
     Yield $f;
21 21
     Yield From fun();
22 22
 };
Please login to merge, or discard this patch.
Upper-Lower-Casing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@
 block discarded – undo
7 7
 if ($a and $b or $c xor $d) { die; } elseif( $var ) { } else {}
8 8
 goto a;
9 9
 
10
-Class Something EXTENDS SomethingElse implementS Whatever {}
11
-Abstract Public Private Protected function whatever() {}
12
-CONST array();
13
-ForEach ($var As $var) { Exit; }
14
-If ($a AND $b OR $c XOR $d) { Die; } ElseIf( $var ) { } Else {}
15
-GOTO a;
16
-$b = function (Array $a) {};
17
-const PRIVATE;
18
-HttpStatus::CONTINUE;
19
-$c = Function ($f) {
20
-    Yield $f;
10
+class Something extends SomethingElse implements Whatever {}
11
+abstract public private protected function whatever() {}
12
+const array();
13
+foreach ($var as $var) { exit; }
14
+if ($a and $b or $c xor $d) { die; } elseif( $var ) { } else {}
15
+goto a;
16
+$b = function (array $a) {};
17
+const private;
18
+HttpStatus::continue;
19
+$c = function ($f) {
20
+    yield $f;
21 21
     Yield From fun();
22 22
 };
23 23
 class X extends Y {
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Generic/Tests/PHP/DiscourageGotoUnitTest.inc 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@
 block discarded – undo
7 7
 echo 'Bar';
8 8
 
9 9
 for($i=0,$j=50; $i<100; $i++) {
10
-    while($j--) {
11
-        if($j==17) goto end;
12
-    }
10
+	while($j--) {
11
+		if($j==17) goto end;
12
+	}
13 13
 }
14 14
 echo "i = $i";
15 15
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
6 6
 a:
7 7
 echo 'Bar';
8 8
 
9
-for($i=0,$j=50; $i<100; $i++) {
10
-    while($j--) {
11
-        if($j==17) goto end;
9
+for ( $i = 0, $j = 50; $i < 100; $i++ ) {
10
+    while ( $j-- ) {
11
+        if ( $j == 17 ) goto end;
12 12
     }
13 13
 }
14 14
 echo "i = $i";
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,9 @@
 block discarded – undo
8 8
 
9 9
 for($i=0,$j=50; $i<100; $i++) {
10 10
     while($j--) {
11
-        if($j==17) goto end;
11
+        if($j==17) {
12
+        	goto end;
13
+        }
12 14
     }
13 15
 }
14 16
 echo "i = $i";
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/PHP/ForbiddenFunctionsUnitTest.php 3 patches
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.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class ForbiddenFunctionsUnitTest extends AbstractSniffUnitTest
15
-{
14
+class ForbiddenFunctionsUnitTest extends AbstractSniffUnitTest {
16 15
 
17 16
 
18 17
     /**
@@ -23,8 +22,7 @@  discard block
 block discarded – undo
23 22
      *
24 23
      * @return array<int, int>
25 24
      */
26
-    public function getErrorList()
27
-    {
25
+    public function getErrorList() {
28 26
         $errors = [
29 27
             2 => 1,
30 28
             4 => 1,
@@ -44,8 +42,7 @@  discard block
 block discarded – undo
44 42
      *
45 43
      * @return array<int, int>
46 44
      */
47
-    public function getWarningList()
48
-    {
45
+    public function getWarningList() {
49 46
         return [];
50 47
 
51 48
     }//end getWarningList()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
      */
65 65
     public function getWarningList()
66 66
     {
67
-        return [];
67
+        return [ ];
68 68
 
69 69
     }//end getWarningList()
70 70
 
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.1.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 <script language="php">
5 5
 echo $var;
6 6
 </script>
7
-<script language='php'>echo $var;</script>
7
+<script language='php'>echo $var; </script>
8 8
 <script type="text/php" language="php">
9 9
 echo $var;
10 10
 </script>
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/PHP/BacktickOperatorUnitTest.php 3 patches
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 => 2];
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 => 2];
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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function getErrorList()
27 27
     {
28
-        return [2 => 2];
28
+        return [ 2 => 2 ];
29 29
 
30 30
     }//end getErrorList()
31 31
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function getWarningList()
42 42
     {
43
-        return [];
43
+        return [ ];
44 44
 
45 45
     }//end getWarningList()
46 46
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class BacktickOperatorUnitTest extends AbstractSniffUnitTest
15
-{
14
+class BacktickOperatorUnitTest extends AbstractSniffUnitTest {
16 15
 
17 16
 
18 17
     /**
@@ -23,8 +22,7 @@  discard block
 block discarded – undo
23 22
      *
24 23
      * @return array<int, int>
25 24
      */
26
-    public function getErrorList()
27
-    {
25
+    public function getErrorList() {
28 26
         return [2 => 2];
29 27
 
30 28
     }//end getErrorList()
@@ -38,8 +36,7 @@  discard block
 block discarded – undo
38 36
      *
39 37
      * @return array<int, int>
40 38
      */
41
-    public function getWarningList()
42
-    {
39
+    public function getWarningList() {
43 40
         return [];
44 41
 
45 42
     }//end getWarningList()
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Generic/Tests/PHP/SAPIUsageUnitTest.php 3 patches
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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function getErrorList()
27 27
     {
28
-        return [2 => 1];
28
+        return [ 2 => 1 ];
29 29
 
30 30
     }//end getErrorList()
31 31
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function getWarningList()
42 42
     {
43
-        return [];
43
+        return [ ];
44 44
 
45 45
     }//end getWarningList()
46 46
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class SAPIUsageUnitTest extends AbstractSniffUnitTest
15
-{
14
+class SAPIUsageUnitTest extends AbstractSniffUnitTest {
16 15
 
17 16
 
18 17
     /**
@@ -23,8 +22,7 @@  discard block
 block discarded – undo
23 22
      *
24 23
      * @return array<int, int>
25 24
      */
26
-    public function getErrorList()
27
-    {
25
+    public function getErrorList() {
28 26
         return [2 => 1];
29 27
 
30 28
     }//end getErrorList()
@@ -38,8 +36,7 @@  discard block
 block discarded – undo
38 36
      *
39 37
      * @return array<int, int>
40 38
      */
41
-    public function getWarningList()
42
-    {
39
+    public function getWarningList() {
43 40
         return [];
44 41
 
45 42
     }//end getWarningList()
Please login to merge, or discard this patch.
php_codesniffer/src/Standards/Generic/Tests/PHP/SyntaxUnitTest.php 3 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -16,34 +16,34 @@
 block discarded – undo
16 16
 {
17 17
 
18 18
 
19
-    /**
20
-     * Returns the lines where errors should occur.
21
-     *
22
-     * The key of the array should represent the line number and the value
23
-     * should represent the number of errors that should occur on that line.
24
-     *
25
-     * @return array<int, int>
26
-     */
27
-    public function getErrorList()
28
-    {
29
-        return [3 => 1];
30
-
31
-    }//end getErrorList()
32
-
33
-
34
-    /**
35
-     * Returns the lines where warnings should occur.
36
-     *
37
-     * The key of the array should represent the line number and the value
38
-     * should represent the number of warnings that should occur on that line.
39
-     *
40
-     * @return array<int, int>
41
-     */
42
-    public function getWarningList()
43
-    {
44
-        return [];
45
-
46
-    }//end getWarningList()
19
+	/**
20
+	 * Returns the lines where errors should occur.
21
+	 *
22
+	 * The key of the array should represent the line number and the value
23
+	 * should represent the number of errors that should occur on that line.
24
+	 *
25
+	 * @return array<int, int>
26
+	 */
27
+	public function getErrorList()
28
+	{
29
+		return [3 => 1];
30
+
31
+	}//end getErrorList()
32
+
33
+
34
+	/**
35
+	 * Returns the lines where warnings should occur.
36
+	 *
37
+	 * The key of the array should represent the line number and the value
38
+	 * should represent the number of warnings that should occur on that line.
39
+	 *
40
+	 * @return array<int, int>
41
+	 */
42
+	public function getWarningList()
43
+	{
44
+		return [];
45
+
46
+	}//end getWarningList()
47 47
 
48 48
 
49 49
 }//end class
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function getErrorList()
28 28
     {
29
-        return [3 => 1];
29
+        return [ 3 => 1 ];
30 30
 
31 31
     }//end getErrorList()
32 32
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function getWarningList()
43 43
     {
44
-        return [];
44
+        return [ ];
45 45
 
46 46
     }//end getWarningList()
47 47
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
14 14
 
15
-class SyntaxUnitTest extends AbstractSniffUnitTest
16
-{
15
+class SyntaxUnitTest extends AbstractSniffUnitTest {
17 16
 
18 17
 
19 18
     /**
@@ -24,8 +23,7 @@  discard block
 block discarded – undo
24 23
      *
25 24
      * @return array<int, int>
26 25
      */
27
-    public function getErrorList()
28
-    {
26
+    public function getErrorList() {
29 27
         return [3 => 1];
30 28
 
31 29
     }//end getErrorList()
@@ -39,8 +37,7 @@  discard block
 block discarded – undo
39 37
      *
40 38
      * @return array<int, int>
41 39
      */
42
-    public function getWarningList()
43
-    {
40
+    public function getWarningList() {
44 41
         return [];
45 42
 
46 43
     }//end getWarningList()
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/PHP/UpperCaseConstantUnitTest.php 3 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -15,49 +15,49 @@
 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
-            7  => 1,
30
-            10 => 1,
31
-            15 => 1,
32
-            16 => 1,
33
-            23 => 1,
34
-            26 => 1,
35
-            31 => 1,
36
-            32 => 1,
37
-            39 => 1,
38
-            42 => 1,
39
-            47 => 1,
40
-            48 => 1,
41
-            70 => 1,
42
-            71 => 1,
43
-        ];
44
-
45
-    }//end getErrorList()
46
-
47
-
48
-    /**
49
-     * Returns the lines where warnings should occur.
50
-     *
51
-     * The key of the array should represent the line number and the value
52
-     * should represent the number of warnings that should occur on that line.
53
-     *
54
-     * @return array<int, int>
55
-     */
56
-    public function getWarningList()
57
-    {
58
-        return [];
59
-
60
-    }//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
+			7  => 1,
30
+			10 => 1,
31
+			15 => 1,
32
+			16 => 1,
33
+			23 => 1,
34
+			26 => 1,
35
+			31 => 1,
36
+			32 => 1,
37
+			39 => 1,
38
+			42 => 1,
39
+			47 => 1,
40
+			48 => 1,
41
+			70 => 1,
42
+			71 => 1,
43
+		];
44
+
45
+	}//end getErrorList()
46
+
47
+
48
+	/**
49
+	 * Returns the lines where warnings should occur.
50
+	 *
51
+	 * The key of the array should represent the line number and the value
52
+	 * should represent the number of warnings that should occur on that line.
53
+	 *
54
+	 * @return array<int, int>
55
+	 */
56
+	public function getWarningList()
57
+	{
58
+		return [];
59
+
60
+	}//end getWarningList()
61 61
 
62 62
 
63 63
 }//end class
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class UpperCaseConstantUnitTest extends AbstractSniffUnitTest
15
-{
14
+class UpperCaseConstantUnitTest extends AbstractSniffUnitTest {
16 15
 
17 16
 
18 17
     /**
@@ -23,8 +22,7 @@  discard block
 block discarded – undo
23 22
      *
24 23
      * @return array<int, int>
25 24
      */
26
-    public function getErrorList()
27
-    {
25
+    public function getErrorList() {
28 26
         return [
29 27
             7  => 1,
30 28
             10 => 1,
@@ -53,8 +51,7 @@  discard block
 block discarded – undo
53 51
      *
54 52
      * @return array<int, int>
55 53
      */
56
-    public function getWarningList()
57
-    {
54
+    public function getWarningList() {
58 55
         return [];
59 56
 
60 57
     }//end getWarningList()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
      */
65 65
     public function getWarningList()
66 66
     {
67
-        return [];
67
+        return [ ];
68 68
 
69 69
     }//end getWarningList()
70 70
 
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/PHP/DisallowAlternativePHPTagsUnitTest.php 4 patches
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.
Switch Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -55,22 +55,22 @@
 block discarded – undo
55 55
     public function getErrorList($testFile='')
56 56
     {
57 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 [];
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 74
         }//end switch
75 75
 
76 76
     }//end getErrorList()
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -22,19 +22,19 @@  discard block
 block discarded – undo
22 22
      *
23 23
      * @return string[]
24 24
      */
25
-    protected function getTestFiles($testFileBase)
25
+    protected function getTestFiles( $testFileBase )
26 26
     {
27
-        $testFiles = [$testFileBase.'1.inc'];
27
+        $testFiles = [ $testFileBase . '1.inc' ];
28 28
 
29 29
         $aspTags = false;
30
-        if (PHP_VERSION_ID < 70000) {
31
-            $aspTags = (bool) ini_get('asp_tags');
30
+        if ( PHP_VERSION_ID < 70000 ) {
31
+            $aspTags = (bool)ini_get( 'asp_tags' );
32 32
         }
33 33
 
34
-        if ($aspTags === true) {
35
-            $testFiles[] = $testFileBase.'2.inc';
34
+        if ( $aspTags === true ) {
35
+            $testFiles[ ] = $testFileBase . '2.inc';
36 36
         } else {
37
-            $testFiles[] = $testFileBase.'3.inc';
37
+            $testFiles[ ] = $testFileBase . '3.inc';
38 38
         }
39 39
 
40 40
         return $testFiles;
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
      *
53 53
      * @return array<int, int>
54 54
      */
55
-    public function getErrorList($testFile='')
55
+    public function getErrorList( $testFile = '' )
56 56
     {
57
-        switch ($testFile) {
57
+        switch ( $testFile ) {
58 58
         case 'DisallowAlternativePHPTagsUnitTest.1.inc':
59 59
             return [
60 60
                 4  => 1,
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 5 => 1,
71 71
             ];
72 72
         default:
73
-            return [];
73
+            return [ ];
74 74
         }//end switch
75 75
 
76 76
     }//end getErrorList()
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
      *
87 87
      * @return array<int, int>
88 88
      */
89
-    public function getWarningList($testFile='')
89
+    public function getWarningList( $testFile = '' )
90 90
     {
91
-        if ($testFile === 'DisallowAlternativePHPTagsUnitTest.3.inc') {
91
+        if ( $testFile === 'DisallowAlternativePHPTagsUnitTest.3.inc' ) {
92 92
             return [
93 93
                 3 => 1,
94 94
                 4 => 1,
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             ];
98 98
         }
99 99
 
100
-        return [];
100
+        return [ ];
101 101
 
102 102
     }//end getWarningList()
103 103
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,8 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class DisallowAlternativePHPTagsUnitTest extends AbstractSniffUnitTest
15
-{
14
+class DisallowAlternativePHPTagsUnitTest extends AbstractSniffUnitTest {
16 15
 
17 16
 
18 17
     /**
@@ -22,8 +21,7 @@  discard block
 block discarded – undo
22 21
      *
23 22
      * @return string[]
24 23
      */
25
-    protected function getTestFiles($testFileBase)
26
-    {
24
+    protected function getTestFiles($testFileBase) {
27 25
         $testFiles = [$testFileBase.'1.inc'];
28 26
 
29 27
         $aspTags = false;
@@ -52,8 +50,7 @@  discard block
 block discarded – undo
52 50
      *
53 51
      * @return array<int, int>
54 52
      */
55
-    public function getErrorList($testFile='')
56
-    {
53
+    public function getErrorList($testFile='') {
57 54
         switch ($testFile) {
58 55
         case 'DisallowAlternativePHPTagsUnitTest.1.inc':
59 56
             return [
@@ -86,8 +83,7 @@  discard block
 block discarded – undo
86 83
      *
87 84
      * @return array<int, int>
88 85
      */
89
-    public function getWarningList($testFile='')
90
-    {
86
+    public function getWarningList($testFile='') {
91 87
         if ($testFile === 'DisallowAlternativePHPTagsUnitTest.3.inc') {
92 88
             return [
93 89
                 3 => 1,
Please login to merge, or discard this patch.