Completed
Pull Request — develop (#1492)
by Zack
28:58 queued 09:00
created
Standards/Generic/Tests/CodeAnalysis/UnnecessaryFinalModifierUnitTest.inc 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class Foo {
4
-    public final function fooBar() {}
5
-    protected final function fool() {}
6
-    private final function Bar() {}
4
+	public final function fooBar() {}
5
+	protected final function fool() {}
6
+	private final function Bar() {}
7 7
 }
8 8
 
9 9
 final class Foo_Bar {
10
-    public $foobar;
11
-    public final $FOOBAR = 23; // Parse error, but that's not the concern of this sniff, so report it.
12
-    public final function fooBar() {}
10
+	public $foobar;
11
+	public final $FOOBAR = 23; // Parse error, but that's not the concern of this sniff, so report it.
12
+	public final function fooBar() {}
13 13
 
14
-    protected function foo() {}
15
-    protected final function fool() {}
14
+	protected function foo() {}
15
+	protected final function fool() {}
16 16
 
17
-    private function Bar() {}
18
-    private final function Bard() {}
17
+	private function Bar() {}
18
+	private final function Bard() {}
19 19
 }
20 20
 
21 21
 final class Bar_Foo {
22
-    public $foobar;
23
-    protected $foo;
24
-    private $bar;
22
+	public $foobar;
23
+	protected $foo;
24
+	private $bar;
25 25
 
26
-    public function fooBar() {}
27
-    protected function foo() {}
28
-    private function Bar() {}
26
+	public function fooBar() {}
27
+	protected function foo() {}
28
+	private function Bar() {}
29 29
 }
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.inc 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,25 +1,25 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 for ($i = 0; $i < 20; $i++) {
4
-    for ($j = 0; $j < 5; $i += 2) {
5
-        for ($k = 0; $k > 3; $i++) {
4
+	for ($j = 0; $j < 5; $i += 2) {
5
+		for ($k = 0; $k > 3; $i++) {
6 6
             
7
-        }
8
-    }
7
+		}
8
+	}
9 9
 }
10 10
 
11 11
 for ($i = 0; $i < 20; $i++) {
12
-    for ($j = 0; $j < 5; $j += 2) {
13
-        for ($k = 0; $k > 3; $k++) {
12
+	for ($j = 0; $j < 5; $j += 2) {
13
+		for ($k = 0; $k > 3; $k++) {
14 14
             
15
-        }
16
-    }
15
+		}
16
+	}
17 17
 }
18 18
 
19 19
 for ($i = 0; $i < 20; $i++) {
20
-    for ($j = 0; $j < 5; $j += 2) {
21
-        for ($k = 0; $k > 3; $j++) {
20
+	for ($j = 0; $j < 5; $j += 2) {
21
+		for ($k = 0; $k > 3; $j++) {
22 22
             
23
-        }
24
-    }
23
+		}
24
+	}
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,24 +1,24 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-for ($i = 0; $i < 20; $i++) {
4
-    for ($j = 0; $j < 5; $i += 2) {
5
-        for ($k = 0; $k > 3; $i++) {
3
+for ( $i = 0; $i < 20; $i++ ) {
4
+    for ( $j = 0; $j < 5; $i += 2 ) {
5
+        for ( $k = 0; $k > 3; $i++ ) {
6 6
             
7 7
         }
8 8
     }
9 9
 }
10 10
 
11
-for ($i = 0; $i < 20; $i++) {
12
-    for ($j = 0; $j < 5; $j += 2) {
13
-        for ($k = 0; $k > 3; $k++) {
11
+for ( $i = 0; $i < 20; $i++ ) {
12
+    for ( $j = 0; $j < 5; $j += 2 ) {
13
+        for ( $k = 0; $k > 3; $k++ ) {
14 14
             
15 15
         }
16 16
     }
17 17
 }
18 18
 
19
-for ($i = 0; $i < 20; $i++) {
20
-    for ($j = 0; $j < 5; $j += 2) {
21
-        for ($k = 0; $k > 3; $j++) {
19
+for ( $i = 0; $i < 20; $i++ ) {
20
+    for ( $j = 0; $j < 5; $j += 2 ) {
21
+        for ( $k = 0; $k > 3; $j++ ) {
22 22
             
23 23
         }
24 24
     }
Please login to merge, or discard this patch.
Standards/Generic/Tests/CodeAnalysis/ForLoopShouldBeWhileLoopUnitTest.php 3 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -15,37 +15,37 @@
 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
-            6  => 1,
45
-            10 => 1,
46
-        ];
47
-
48
-    }//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
+			6  => 1,
45
+			10 => 1,
46
+		];
47
+
48
+	}//end getWarningList()
49 49
 
50 50
 
51 51
 }//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 ForLoopShouldBeWhileLoopUnitTest extends AbstractSniffUnitTest
15
-{
14
+class ForLoopShouldBeWhileLoopUnitTest 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
 
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
             6  => 1,
45 42
             10 => 1,
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
     public function getErrorList()
27 27
     {
28
-        return [];
28
+        return [ ];
29 29
 
30 30
     }//end getErrorList()
31 31
 
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.php 3 patches
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -15,68 +15,68 @@
 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 [];
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 29
 
30
-    }//end getErrorList()
30
+	}//end getErrorList()
31 31
 
32 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
-            46 => 1,
45
-            47 => 1,
46
-            48 => 1,
47
-            49 => 1,
48
-            50 => 1,
49
-            51 => 1,
50
-            52 => 1,
51
-            53 => 1,
52
-            54 => 1,
53
-            55 => 1,
54
-            56 => 1,
55
-            57 => 1,
56
-            58 => 1,
57
-            59 => 1,
58
-            60 => 1,
59
-            61 => 2,
60
-            63 => 1,
61
-            64 => 1,
62
-            67 => 1,
63
-            68 => 1,
64
-            69 => 1,
65
-            70 => 1,
66
-            71 => 1,
67
-            72 => 1,
68
-            73 => 1,
69
-            75 => 1,
70
-            77 => 1,
71
-            80 => 2,
72
-            84 => 1,
73
-            85 => 2,
74
-            88 => 1,
75
-            90 => 1,
76
-            92 => 1,
77
-        ];
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
+			46 => 1,
45
+			47 => 1,
46
+			48 => 1,
47
+			49 => 1,
48
+			50 => 1,
49
+			51 => 1,
50
+			52 => 1,
51
+			53 => 1,
52
+			54 => 1,
53
+			55 => 1,
54
+			56 => 1,
55
+			57 => 1,
56
+			58 => 1,
57
+			59 => 1,
58
+			60 => 1,
59
+			61 => 2,
60
+			63 => 1,
61
+			64 => 1,
62
+			67 => 1,
63
+			68 => 1,
64
+			69 => 1,
65
+			70 => 1,
66
+			71 => 1,
67
+			72 => 1,
68
+			73 => 1,
69
+			75 => 1,
70
+			77 => 1,
71
+			80 => 2,
72
+			84 => 1,
73
+			85 => 2,
74
+			88 => 1,
75
+			90 => 1,
76
+			92 => 1,
77
+		];
78 78
 
79
-    }//end getWarningList()
79
+	}//end getWarningList()
80 80
 
81 81
 
82 82
 }//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 AssignmentInConditionUnitTest extends AbstractSniffUnitTest
15
-{
14
+class AssignmentInConditionUnitTest 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
 
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
             46 => 1,
45 42
             47 => 1,
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
     public function getErrorList()
27 27
     {
28
-        return [];
28
+        return [ ];
29 29
 
30 30
     }//end getErrorList()
31 31
 
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.php 3 patches
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -15,38 +15,38 @@
 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  => 2,
45
-            4  => 1,
46
-            20 => 1,
47
-        ];
48
-
49
-    }//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  => 2,
45
+			4  => 1,
46
+			20 => 1,
47
+		];
48
+
49
+	}//end getWarningList()
50 50
 
51 51
 
52 52
 }//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 JumbledIncrementerUnitTest extends AbstractSniffUnitTest
15
-{
14
+class JumbledIncrementerUnitTest 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
 
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
             3  => 2,
45 42
             4  => 1,
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
     public function getErrorList()
27 27
     {
28
-        return [];
28
+        return [ ];
29 29
 
30 30
     }//end getErrorList()
31 31
 
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/CodeAnalysis/EmptyStatementUnitTest.php 3 patches
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -15,48 +15,48 @@
 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
-            3  => 1,
30
-            15 => 1,
31
-            17 => 1,
32
-            19 => 1,
33
-            30 => 1,
34
-            35 => 1,
35
-            41 => 1,
36
-            47 => 1,
37
-            52 => 1,
38
-            55 => 1,
39
-            64 => 1,
40
-            68 => 1,
41
-            72 => 2,
42
-        ];
43
-
44
-    }//end getErrorList()
45
-
46
-
47
-    /**
48
-     * Returns the lines where warnings should occur.
49
-     *
50
-     * The key of the array should represent the line number and the value
51
-     * should represent the number of warnings that should occur on that line.
52
-     *
53
-     * @return array<int, int>
54
-     */
55
-    public function getWarningList()
56
-    {
57
-        return [];
58
-
59
-    }//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
+			3  => 1,
30
+			15 => 1,
31
+			17 => 1,
32
+			19 => 1,
33
+			30 => 1,
34
+			35 => 1,
35
+			41 => 1,
36
+			47 => 1,
37
+			52 => 1,
38
+			55 => 1,
39
+			64 => 1,
40
+			68 => 1,
41
+			72 => 2,
42
+		];
43
+
44
+	}//end getErrorList()
45
+
46
+
47
+	/**
48
+	 * Returns the lines where warnings should occur.
49
+	 *
50
+	 * The key of the array should represent the line number and the value
51
+	 * should represent the number of warnings that should occur on that line.
52
+	 *
53
+	 * @return array<int, int>
54
+	 */
55
+	public function getWarningList()
56
+	{
57
+		return [];
58
+
59
+	}//end getWarningList()
60 60
 
61 61
 
62 62
 }//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 EmptyStatementUnitTest extends AbstractSniffUnitTest
15
-{
14
+class EmptyStatementUnitTest 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
             3  => 1,
30 28
             15 => 1,
@@ -52,8 +50,7 @@  discard block
 block discarded – undo
52 50
      *
53 51
      * @return array<int, int>
54 52
      */
55
-    public function getWarningList()
56
-    {
53
+    public function getWarningList() {
57 54
         return [];
58 55
 
59 56
     }//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/CodeAnalysis/AssignmentInConditionUnitTest.inc 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 } else if($a ??= $b) {
61 61
 } elseif( $a = 'abc' && $b = 'def' ) {
62 62
 } elseif(
63
-    $a = 'abc'
63
+	$a = 'abc'
64 64
 	&& $a .= 'def'
65 65
 ) {}
66 66
 
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // OK.
4
-if ($a === 123) {
5
-} elseif ($a == 123) {
6
-} elseif ($a !== 123) {
7
-} elseif ($a != 123) {}
4
+if ( $a === 123 ) {
5
+} elseif ( $a == 123 ) {
6
+} elseif ( $a !== 123 ) {
7
+} elseif ( $a != 123 ) {}
8 8
 
9 9
 function abc( $a = 'default' ) {}
10
-if (in_array( $a, array( 1 => 'a', 2 => 'b' ) ) ) {}
10
+if ( in_array( $a, array( 1 => 'a', 2 => 'b' ) ) ) {}
11 11
 
12 12
 switch ( $a === $b ) {}
13 13
 switch ( true ) {
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 for ( $i = 0; $i == 100; $i++ ) {}
19 19
 for ( $i = 0; $i >= 100; $i++ ) {}
20 20
 for ( $i = 0; ; $i++ ) {}
21
-for (;;) {}
21
+for ( ;; ) {}
22 22
 
23 23
 do {
24 24
 } while ( $sample == false );
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
 while ( $sample === false ) {}
27 27
 
28 28
 // Silly, but not an assignment.
29
-if (123 = $a) {}
30
-if (strtolower($b) = $b) {}
31
-if (array( 1 => 'a', 2 => 'b' ) = $b) {}
29
+if ( 123 = $a ) {}
30
+if ( strtolower( $b ) = $b ) {}
31
+if ( array( 1 => 'a', 2 => 'b' ) = $b ) {}
32 32
 
33
-if (SOME_CONSTANT = 123) {
34
-} else if(self::SOME_CONSTANT -= 10) {}
33
+if ( SOME_CONSTANT = 123 ) {
34
+} else if ( self::SOME_CONSTANT -= 10 ) {}
35 35
 
36 36
 if ( $a() = 123 ) {
37 37
 } else if ( $b->something() = 123 ) {
@@ -43,34 +43,34 @@  discard block
 block discarded – undo
43 43
 }
44 44
 
45 45
 // Assignments in condition.
46
-if ($a = 123) {
47
-} elseif ($a = 'abc') {
48
-} else if( $a += 10 ) {
49
-} else if($a -= 10) {
50
-} else if($a *= 10) {
51
-} else if($a **= 10) {
52
-} else if($a /= 10) {
53
-} else if($a .= strtolower($b)) {
54
-} else if($a %= SOME_CONSTANT) {
55
-} else if($a &= 2) {
56
-} else if($a |= 2) {
57
-} else if($a ^= 2) {
58
-} else if($a <<= 2) {
59
-} else if($a >>= 2) {
60
-} else if($a ??= $b) {
61
-} elseif( $a = 'abc' && $b = 'def' ) {
62
-} elseif(
46
+if ( $a = 123 ) {
47
+} elseif ( $a = 'abc' ) {
48
+} else if ( $a += 10 ) {
49
+} else if ( $a -= 10 ) {
50
+} else if ( $a *= 10 ) {
51
+} else if ( $a **= 10 ) {
52
+} else if ( $a /= 10 ) {
53
+} else if ( $a .= strtolower( $b ) ) {
54
+} else if ( $a %= SOME_CONSTANT ) {
55
+} else if ( $a &= 2 ) {
56
+} else if ( $a |= 2 ) {
57
+} else if ( $a ^= 2 ) {
58
+} else if ( $a <<= 2 ) {
59
+} else if ( $a >>= 2 ) {
60
+} else if ( $a ??= $b ) {
61
+} elseif ( $a = 'abc' && $b = 'def' ) {
62
+} elseif (
63 63
     $a = 'abc'
64 64
 	&& $a .= 'def'
65 65
 ) {}
66 66
 
67
-if ($a[] = 123) {
68
-} elseif ($a['something'] = 123) {
69
-} elseif (self::$a = 123) {
70
-} elseif (parent::$a *= 123) {
71
-} elseif (static::$a = 123) {
72
-} elseif (MyClass::$a .= 'abc') {
73
-} else if( $this->something += 10 ) {}
67
+if ( $a[ ] = 123 ) {
68
+} elseif ( $a[ 'something' ] = 123 ) {
69
+} elseif ( self::$a = 123 ) {
70
+} elseif ( parent::$a *= 123 ) {
71
+} elseif ( static::$a = 123 ) {
72
+} elseif ( MyClass::$a .= 'abc' ) {
73
+} else if ( $this->something += 10 ) {}
74 74
 
75 75
 switch ( $a = $b ) {}
76 76
 switch ( true ) {
@@ -89,5 +89,5 @@  discard block
 block discarded – undo
89 89
 
90 90
 while ( $sample = false ) {}
91 91
 
92
-if ($a = 123) :
92
+if ( $a = 123 ) :
93 93
 endif;
Please login to merge, or discard this patch.
Standards/Generic/Tests/CodeAnalysis/UnconditionalIfStatementUnitTest.php 3 patches
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -15,38 +15,38 @@
 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
-            5 => 1,
46
-            7 => 1,
47
-        ];
48
-
49
-    }//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
+			5 => 1,
46
+			7 => 1,
47
+		];
48
+
49
+	}//end getWarningList()
50 50
 
51 51
 
52 52
 }//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 UnconditionalIfStatementUnitTest extends AbstractSniffUnitTest
15
-{
14
+class UnconditionalIfStatementUnitTest 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
 
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
             3 => 1,
45 42
             5 => 1,
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
     public function getErrorList()
27 27
     {
28
-        return [];
28
+        return [ ];
29 29
 
30 30
     }//end getErrorList()
31 31
 
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/Files/EndFileNewlineUnitTest.4.inc 5 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -1,2 +1,1 @@
 block discarded – undo
1 1
 <?php
2
-/** Why me?
3 2
\ No newline at end of file
Please login to merge, or discard this patch.
Switch Indentation   -1 removed lines patch added patch discarded remove patch
@@ -1,2 +1,1 @@
 block discarded – undo
1 1
 <?php
2
-/** Why me?
3 2
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   -1 removed lines patch added patch discarded remove patch
@@ -1,2 +1,1 @@
 block discarded – undo
1 1
 <?php
2
-/** Why me?
3 2
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   -1 removed lines patch added patch discarded remove patch
@@ -1,2 +1,1 @@
 block discarded – undo
1 1
 <?php
2
-/** Why me?
3 2
\ No newline at end of file
Please login to merge, or discard this patch.
Upper-Lower-Casing   -1 removed lines patch added patch discarded remove patch
@@ -1,2 +1,1 @@
 block discarded – undo
1 1
 <?php
2
-/** Why me?
3 2
\ No newline at end of file
Please login to merge, or discard this patch.