Completed
Branch dev (9eae52)
by
unknown
17:17 queued 17:17
created
Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.php 2 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
-            4  => 1,
45
-            13 => 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
+			4  => 1,
45
+			13 => 1,
46
+		];
47
+
48
+	}//end getWarningList()
49 49
 
50 50
 
51 51
 }//end class
Please login to merge, or discard this patch.
Switch Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+	<?php
2 2
 /**
3 3
  * Unit test class for the ForLoopWithTestFunctionCall sniff.
4 4
  *
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
  * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
8 8
  */
9 9
 
10
-namespace PHP_CodeSniffer\Standards\Generic\Tests\CodeAnalysis;
10
+	namespace PHP_CodeSniffer\Standards\Generic\Tests\CodeAnalysis;
11 11
 
12
-use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
12
+	use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class ForLoopWithTestFunctionCallUnitTest extends AbstractSniffUnitTest
15
-{
14
+	class ForLoopWithTestFunctionCallUnitTest extends AbstractSniffUnitTest
15
+	{
16 16
 
17 17
 
18
-    /**
18
+    	/**
19 19
      * Returns the lines where errors should occur.
20 20
      *
21 21
      * The key of the array should represent the line number and the value
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
      *
24 24
      * @return array<int, int>
25 25
      */
26
-    public function getErrorList()
27
-    {
28
-        return [];
26
+    	public function getErrorList()
27
+    	{
28
+        	return [];
29 29
 
30
-    }//end getErrorList()
30
+    	}//end getErrorList()
31 31
 
32 32
 
33
-    /**
33
+    	/**
34 34
      * Returns the lines where warnings should occur.
35 35
      *
36 36
      * The key of the array should represent the line number and the value
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
      *
39 39
      * @return array<int, int>
40 40
      */
41
-    public function getWarningList()
42
-    {
43
-        return [
44
-            4  => 1,
45
-            13 => 1,
46
-        ];
47
-
48
-    }//end getWarningList()
41
+    	public function getWarningList()
42
+    	{
43
+        	return [
44
+            	4  => 1,
45
+            	13 => 1,
46
+        	];
47
+
48
+    	}//end getWarningList()
49 49
 
50 50
 
51 51
 }//end class
Please login to merge, or discard this patch.
Standards/Generic/Tests/CodeAnalysis/ForLoopShouldBeWhileLoopUnitTest.php 2 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.
Switch Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+	<?php
2 2
 /**
3 3
  * Unit test class for the ForLoopShouldBeWhileLoop sniff.
4 4
  *
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
  * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
8 8
  */
9 9
 
10
-namespace PHP_CodeSniffer\Standards\Generic\Tests\CodeAnalysis;
10
+	namespace PHP_CodeSniffer\Standards\Generic\Tests\CodeAnalysis;
11 11
 
12
-use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
12
+	use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class ForLoopShouldBeWhileLoopUnitTest extends AbstractSniffUnitTest
15
-{
14
+	class ForLoopShouldBeWhileLoopUnitTest extends AbstractSniffUnitTest
15
+	{
16 16
 
17 17
 
18
-    /**
18
+    	/**
19 19
      * Returns the lines where errors should occur.
20 20
      *
21 21
      * The key of the array should represent the line number and the value
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
      *
24 24
      * @return array<int, int>
25 25
      */
26
-    public function getErrorList()
27
-    {
28
-        return [];
26
+    	public function getErrorList()
27
+    	{
28
+        	return [];
29 29
 
30
-    }//end getErrorList()
30
+    	}//end getErrorList()
31 31
 
32 32
 
33
-    /**
33
+    	/**
34 34
      * Returns the lines where warnings should occur.
35 35
      *
36 36
      * The key of the array should represent the line number and the value
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
      *
39 39
      * @return array<int, int>
40 40
      */
41
-    public function getWarningList()
42
-    {
43
-        return [
44
-            6  => 1,
45
-            10 => 1,
46
-        ];
47
-
48
-    }//end getWarningList()
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.
src/Standards/Generic/Tests/CodeAnalysis/AssignmentInConditionUnitTest.inc 3 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   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -6,38 +6,38 @@  discard block
 block discarded – undo
6 6
 } elseif ($a !== 123) {
7 7
 } elseif ($a != 123) {}
8 8
 
9
-function abc( $a = 'default' ) {}
10
-if (in_array( $a, array( 1 => 'a', 2 => 'b' ) ) ) {}
9
+function abc($a = 'default') {}
10
+if (in_array($a, array(1 => 'a', 2 => 'b'))) {}
11 11
 
12
-switch ( $a === $b ) {}
13
-switch ( true ) {
12
+switch ($a === $b) {}
13
+switch (true) {
14 14
 	case $sample == 'something':
15 15
 		break;
16 16
 }
17 17
 
18
-for ( $i = 0; $i == 100; $i++ ) {}
19
-for ( $i = 0; $i >= 100; $i++ ) {}
20
-for ( $i = 0; ; $i++ ) {}
18
+for ($i = 0; $i == 100; $i++) {}
19
+for ($i = 0; $i >= 100; $i++) {}
20
+for ($i = 0; ; $i++) {}
21 21
 for (;;) {}
22 22
 
23 23
 do {
24
-} while ( $sample == false );
24
+}while ($sample == false);
25 25
 
26
-while ( $sample === false ) {}
26
+while ($sample === false) {}
27 27
 
28 28
 // Silly, but not an assignment.
29 29
 if (123 = $a) {}
30 30
 if (strtolower($b) = $b) {}
31
-if (array( 1 => 'a', 2 => 'b' ) = $b) {}
31
+if (array(1 => 'a', 2 => 'b') = $b) {}
32 32
 
33 33
 if (SOME_CONSTANT = 123) {
34
-} else if(self::SOME_CONSTANT -= 10) {}
34
+} else if (self::SOME_CONSTANT -= 10) {}
35 35
 
36
-if ( $a() = 123 ) {
37
-} else if ( $b->something() = 123 ) {
38
-} elseif ( $c::something() = 123 ) {}
36
+if ($a() = 123) {
37
+} else if ($b->something() = 123) {
38
+} elseif ($c::something() = 123) {}
39 39
 
40
-switch ( true ) {
40
+switch (true) {
41 41
 	case 'something' = $sample:
42 42
 		break;
43 43
 }
@@ -45,21 +45,21 @@  discard block
 block discarded – undo
45 45
 // Assignments in condition.
46 46
 if ($a = 123) {
47 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(
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
 ) {}
@@ -70,10 +70,10 @@  discard block
 block discarded – undo
70 70
 } elseif (parent::$a *= 123) {
71 71
 } elseif (static::$a = 123) {
72 72
 } elseif (MyClass::$a .= 'abc') {
73
-} else if( $this->something += 10 ) {}
73
+} else if ($this->something += 10) {}
74 74
 
75
-switch ( $a = $b ) {}
76
-switch ( true ) {
75
+switch ($a = $b) {}
76
+switch (true) {
77 77
 	case $sample = 'something':
78 78
 		break;
79 79
 
@@ -81,15 +81,15 @@  discard block
 block discarded – undo
81 81
 		break;
82 82
 }
83 83
 
84
-for ( $i = 0; $i = 100; $i++ ) {}
85
-for ( $i = 0; $i = 100 && $b = false; $i++ ) {}
84
+for ($i = 0; $i = 100; $i++) {}
85
+for ($i = 0; $i = 100 && $b = false; $i++) {}
86 86
 
87 87
 do {
88
-} while ( $sample = false );
88
+}while ($sample = false);
89 89
 
90
-while ( $sample = false ) {}
90
+while ($sample = false) {}
91 91
 
92 92
 if ($a = 123) :
93 93
 endif;
94 94
 
95
-match ($a[0] = 123) {};
95
+match($a[0] = 123) {};
Please login to merge, or discard this patch.
Switch Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1
-<?php
1
+	<?php
2 2
 
3
-// OK.
4
-if ($a === 123) {
3
+	// OK.
4
+	if ($a === 123) {
5 5
 } elseif ($a == 123) {
6 6
 } elseif ($a !== 123) {
7 7
 } elseif ($a != 123) {}
8 8
 
9
-function abc( $a = 'default' ) {}
10
-if (in_array( $a, array( 1 => 'a', 2 => 'b' ) ) ) {}
9
+	function abc( $a = 'default' ) {}
10
+	if (in_array( $a, array( 1 => 'a', 2 => 'b' ) ) ) {}
11 11
 
12 12
 switch ( $a === $b ) {}
13 13
 switch ( true ) {
@@ -15,25 +15,25 @@  discard block
 block discarded – undo
15 15
 		break;
16 16
 }
17 17
 
18
-for ( $i = 0; $i == 100; $i++ ) {}
19
-for ( $i = 0; $i >= 100; $i++ ) {}
20
-for ( $i = 0; ; $i++ ) {}
21
-for (;;) {}
18
+	for ( $i = 0; $i == 100; $i++ ) {}
19
+	for ( $i = 0; $i >= 100; $i++ ) {}
20
+	for ( $i = 0; ; $i++ ) {}
21
+	for (;;) {}
22 22
 
23
-do {
23
+	do {
24 24
 } while ( $sample == false );
25 25
 
26
-while ( $sample === false ) {}
26
+	while ( $sample === false ) {}
27 27
 
28
-// Silly, but not an assignment.
29
-if (123 = $a) {}
30
-if (strtolower($b) = $b) {}
31
-if (array( 1 => 'a', 2 => 'b' ) = $b) {}
28
+	// Silly, but not an assignment.
29
+	if (123 = $a) {}
30
+	if (strtolower($b) = $b) {}
31
+	if (array( 1 => 'a', 2 => 'b' ) = $b) {}
32 32
 
33
-if (SOME_CONSTANT = 123) {
33
+	if (SOME_CONSTANT = 123) {
34 34
 } else if(self::SOME_CONSTANT -= 10) {}
35 35
 
36
-if ( $a() = 123 ) {
36
+	if ( $a() = 123 ) {
37 37
 } else if ( $b->something() = 123 ) {
38 38
 } elseif ( $c::something() = 123 ) {}
39 39
 
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 		break;
43 43
 }
44 44
 
45
-// Assignments in condition.
46
-if ($a = 123) {
45
+	// Assignments in condition.
46
+	if ($a = 123) {
47 47
 } elseif ($a = 'abc') {
48 48
 } else if( $a += 10 ) {
49 49
 } else if($a -= 10) {
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
 } else if($a ??= $b) {
61 61
 } elseif( $a = 'abc' && $b = 'def' ) {
62 62
 } elseif(
63
-    $a = 'abc'
64
-	&& $a .= 'def'
65
-) {}
63
+    	$a = 'abc'
64
+		&& $a .= 'def'
65
+	) {}
66 66
 
67
-if ($a[] = 123) {
67
+	if ($a[] = 123) {
68 68
 } elseif ($a['something'] = 123) {
69 69
 } elseif (self::$a = 123) {
70 70
 } elseif (parent::$a *= 123) {
@@ -81,15 +81,15 @@  discard block
 block discarded – undo
81 81
 		break;
82 82
 }
83 83
 
84
-for ( $i = 0; $i = 100; $i++ ) {}
85
-for ( $i = 0; $i = 100 && $b = false; $i++ ) {}
84
+	for ( $i = 0; $i = 100; $i++ ) {}
85
+	for ( $i = 0; $i = 100 && $b = false; $i++ ) {}
86 86
 
87
-do {
87
+	do {
88 88
 } while ( $sample = false );
89 89
 
90
-while ( $sample = false ) {}
90
+	while ( $sample = false ) {}
91 91
 
92
-if ($a = 123) :
93
-endif;
92
+	if ($a = 123) :
93
+	endif;
94 94
 
95
-match ($a[0] = 123) {};
95
+	match ($a[0] = 123) {};
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.
Switch Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,25 +1,25 @@
 block discarded – undo
1
-<?php
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
-        }
8
-    }
7
+        	}
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
-        }
16
-    }
15
+        	}
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
-        }
24
-    }
23
+        	}
24
+    	}
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/CodeAnalysis/JumbledIncrementerUnitTest.php 2 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.
Switch Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+	<?php
2 2
 /**
3 3
  * Unit test class for the JumbledIncrementer sniff.
4 4
  *
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
  * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
8 8
  */
9 9
 
10
-namespace PHP_CodeSniffer\Standards\Generic\Tests\CodeAnalysis;
10
+	namespace PHP_CodeSniffer\Standards\Generic\Tests\CodeAnalysis;
11 11
 
12
-use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
12
+	use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class JumbledIncrementerUnitTest extends AbstractSniffUnitTest
15
-{
14
+	class JumbledIncrementerUnitTest extends AbstractSniffUnitTest
15
+	{
16 16
 
17 17
 
18
-    /**
18
+    	/**
19 19
      * Returns the lines where errors should occur.
20 20
      *
21 21
      * The key of the array should represent the line number and the value
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
      *
24 24
      * @return array<int, int>
25 25
      */
26
-    public function getErrorList()
27
-    {
28
-        return [];
26
+    	public function getErrorList()
27
+    	{
28
+        	return [];
29 29
 
30
-    }//end getErrorList()
30
+    	}//end getErrorList()
31 31
 
32 32
 
33
-    /**
33
+    	/**
34 34
      * Returns the lines where warnings should occur.
35 35
      *
36 36
      * The key of the array should represent the line number and the value
@@ -38,15 +38,15 @@  discard block
 block discarded – undo
38 38
      *
39 39
      * @return array<int, int>
40 40
      */
41
-    public function getWarningList()
42
-    {
43
-        return [
44
-            3  => 2,
45
-            4  => 1,
46
-            20 => 1,
47
-        ];
48
-
49
-    }//end getWarningList()
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.
Standards/Generic/Tests/CodeAnalysis/UnconditionalIfStatementUnitTest.php 2 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.
Switch Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php
1
+	<?php
2 2
 /**
3 3
  * Unit test class for the UnconditionalIfStatement sniff.
4 4
  *
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
  * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
8 8
  */
9 9
 
10
-namespace PHP_CodeSniffer\Standards\Generic\Tests\CodeAnalysis;
10
+	namespace PHP_CodeSniffer\Standards\Generic\Tests\CodeAnalysis;
11 11
 
12
-use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
12
+	use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
13 13
 
14
-class UnconditionalIfStatementUnitTest extends AbstractSniffUnitTest
15
-{
14
+	class UnconditionalIfStatementUnitTest extends AbstractSniffUnitTest
15
+	{
16 16
 
17 17
 
18
-    /**
18
+    	/**
19 19
      * Returns the lines where errors should occur.
20 20
      *
21 21
      * The key of the array should represent the line number and the value
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
      *
24 24
      * @return array<int, int>
25 25
      */
26
-    public function getErrorList()
27
-    {
28
-        return [];
26
+    	public function getErrorList()
27
+    	{
28
+        	return [];
29 29
 
30
-    }//end getErrorList()
30
+    	}//end getErrorList()
31 31
 
32 32
 
33
-    /**
33
+    	/**
34 34
      * Returns the lines where warnings should occur.
35 35
      *
36 36
      * The key of the array should represent the line number and the value
@@ -38,15 +38,15 @@  discard block
 block discarded – undo
38 38
      *
39 39
      * @return array<int, int>
40 40
      */
41
-    public function getWarningList()
42
-    {
43
-        return [
44
-            3 => 1,
45
-            5 => 1,
46
-            7 => 1,
47
-        ];
48
-
49
-    }//end getWarningList()
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.
Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.inc 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,14 +2,14 @@
 block discarded – undo
2 2
 
3 3
 $a = array(1, 2, 3, 4);
4 4
 for ($i = 0; $i < count($a); $i++) {
5
-    $a[$i] *= $i;
5
+	$a[$i] *= $i;
6 6
 }
7 7
 
8 8
 for ($i = 0, $c = sizeof($a); $i < $c; ++$i) {
9
-    $a[$i] *= $i;
9
+	$a[$i] *= $i;
10 10
 }
11 11
 
12 12
 $it = new ArrayIterator($a);
13 13
 for ($it->rewind(); $it->valid(); $it->next()) {
14
-    echo $it->current();
14
+	echo $it->current();
15 15
 }
16 16
\ No newline at end of file
Please login to merge, or discard this patch.
Switch Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1
-<?php
1
+	<?php
2 2
 
3
-$a = array(1, 2, 3, 4);
4
-for ($i = 0; $i < count($a); $i++) {
5
-    $a[$i] *= $i;
3
+	$a = array(1, 2, 3, 4);
4
+	for ($i = 0; $i < count($a); $i++) {
5
+    	$a[$i] *= $i;
6 6
 }
7 7
 
8
-for ($i = 0, $c = sizeof($a); $i < $c; ++$i) {
9
-    $a[$i] *= $i;
8
+	for ($i = 0, $c = sizeof($a); $i < $c; ++$i) {
9
+    	$a[$i] *= $i;
10 10
 }
11 11
 
12
-$it = new ArrayIterator($a);
13
-for ($it->rewind(); $it->valid(); $it->next()) {
14
-    echo $it->current();
12
+	$it = new ArrayIterator($a);
13
+	for ($it->rewind(); $it->valid(); $it->next()) {
14
+    	echo $it->current();
15 15
 }
16 16
\ No newline at end of file
Please login to merge, or discard this patch.
Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.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
 class FooBar {
4
-    public function __construct($a, $b) {
5
-        parent::__construct($a, $b);
6
-    }
4
+	public function __construct($a, $b) {
5
+		parent::__construct($a, $b);
6
+	}
7 7
 }
8 8
 
9 9
 class BarFoo {
10
-    public function __construct($a, $b) {
11
-        parent::__construct($a, 'XML', $b);
12
-    }
10
+	public function __construct($a, $b) {
11
+		parent::__construct($a, 'XML', $b);
12
+	}
13 13
 }
14 14
 
15 15
 class Foo {
16
-    public function export($a, $b = null) {
17
-        return parent::export($a, $b);
18
-    }
16
+	public function export($a, $b = null) {
17
+		return parent::export($a, $b);
18
+	}
19 19
 }
20 20
 
21 21
 class Bar {
22
-    public function export($a, $b = null) {
23
-        return parent::export($a);
24
-    }
22
+	public function export($a, $b = null) {
23
+		return parent::export($a);
24
+	}
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
Switch Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,25 +1,25 @@
 block discarded – undo
1
-<?php
1
+	<?php
2 2
 
3
-class FooBar {
4
-    public function __construct($a, $b) {
5
-        parent::__construct($a, $b);
6
-    }
3
+	class FooBar {
4
+    	public function __construct($a, $b) {
5
+        	parent::__construct($a, $b);
6
+    	}
7 7
 }
8 8
 
9
-class BarFoo {
10
-    public function __construct($a, $b) {
11
-        parent::__construct($a, 'XML', $b);
12
-    }
9
+	class BarFoo {
10
+    	public function __construct($a, $b) {
11
+        	parent::__construct($a, 'XML', $b);
12
+    	}
13 13
 }
14 14
 
15
-class Foo {
16
-    public function export($a, $b = null) {
17
-        return parent::export($a, $b);
18
-    }
15
+	class Foo {
16
+    	public function export($a, $b = null) {
17
+        	return parent::export($a, $b);
18
+    	}
19 19
 }
20 20
 
21
-class Bar {
22
-    public function export($a, $b = null) {
23
-        return parent::export($a);
24
-    }
21
+	class Bar {
22
+    	public function export($a, $b = null) {
23
+        	return parent::export($a);
24
+    	}
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/CodeAnalysis/EmptyStatementUnitTest.inc 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,13 +41,13 @@
 block discarded – undo
41 41
 do {
42 42
     // Just a comment
43 43
     // Just another comment
44
-} while ($foo);
44
+}while ($foo);
45 45
 
46 46
 do {
47 47
     while ($bar) {
48 48
         
49 49
     }
50
-} while (true);
50
+}while (true);
51 51
 
52 52
 while ($foo) { /* Comment in the same line */ }
53 53
 
Please login to merge, or discard this patch.
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,72 +1,72 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 switch ($foo) {
4
-    // Empty switch statement body 
4
+	// Empty switch statement body 
5 5
 }
6 6
 
7 7
 switch ($foo) {
8
-    case 'bar':
9
-        break;
10
-    default:
11
-        break;
8
+	case 'bar':
9
+		break;
10
+	default:
11
+		break;
12 12
 }
13 13
 
14 14
 
15 15
 if ($foo) {
16
-    // Just a comment
16
+	// Just a comment
17 17
 } elseif ($bar) {
18
-    // Yet another comment 
18
+	// Yet another comment 
19 19
 } else {
20 20
     
21 21
 }
22 22
 
23 23
 if ($foo) {
24
-    $foo = 'bar';
24
+	$foo = 'bar';
25 25
 } else if ($bar) {
26
-    $bar = 'foo';
26
+	$bar = 'foo';
27 27
 }
28 28
 
29 29
 for ($i = 0; $i < 10; $i++) {
30
-    for ($j = 0; $j < 10; $j++) {
31
-        // Just a comment
32
-    }
30
+	for ($j = 0; $j < 10; $j++) {
31
+		// Just a comment
32
+	}
33 33
 }
34 34
 
35 35
 foreach ($foo as $bar) {}
36 36
 
37 37
 foreach ($foo as $bar) {
38
-    $bar *= 2;
38
+	$bar *= 2;
39 39
 }
40 40
 
41 41
 do {
42
-    // Just a comment
43
-    // Just another comment
42
+	// Just a comment
43
+	// Just another comment
44 44
 } while ($foo);
45 45
 
46 46
 do {
47
-    while ($bar) {
47
+	while ($bar) {
48 48
         
49
-    }
49
+	}
50 50
 } while (true);
51 51
 
52 52
 while ($foo) { /* Comment in the same line */ }
53 53
 
54 54
 while ($foo) {
55
-    try {
55
+	try {
56 56
         
57
-    } catch (Exception $e) {
58
-        echo $e->getTraceAsString();
59
-    }
57
+	} catch (Exception $e) {
58
+		echo $e->getTraceAsString();
59
+	}
60 60
 }
61 61
 
62 62
 try {
63
-    throw Exception('Error...');
63
+	throw Exception('Error...');
64 64
 } catch (Exception $e) {}
65 65
 
66 66
 try {
67
-    throw Exception('Error...');
67
+	throw Exception('Error...');
68 68
 } catch (Exception $e) {
69
-    // TODO: Handle this exception later :-)
69
+	// TODO: Handle this exception later :-)
70 70
 }
71 71
 
72 72
 if (true) {} elseif (false) {}
Please login to merge, or discard this patch.
Switch Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -1,74 +1,74 @@
 block discarded – undo
1
-<?php
1
+	<?php
2 2
 
3 3
 switch ($foo) {
4
-    // Empty switch statement body 
4
+    	// Empty switch statement body 
5 5
 }
6 6
 
7 7
 switch ($foo) {
8
-    case 'bar':
9
-        break;
10
-    default:
11
-        break;
8
+    		case 'bar':
9
+        		break;
10
+    		default:
11
+        		break;
12 12
 }
13 13
 
14 14
 
15
-if ($foo) {
16
-    // Just a comment
15
+	if ($foo) {
16
+    	// Just a comment
17 17
 } elseif ($bar) {
18
-    // Yet another comment 
18
+    	// Yet another comment 
19 19
 } else {
20 20
     
21 21
 }
22 22
 
23
-if ($foo) {
24
-    $foo = 'bar';
23
+	if ($foo) {
24
+    	$foo = 'bar';
25 25
 } else if ($bar) {
26
-    $bar = 'foo';
26
+    	$bar = 'foo';
27 27
 }
28 28
 
29
-for ($i = 0; $i < 10; $i++) {
30
-    for ($j = 0; $j < 10; $j++) {
31
-        // Just a comment
32
-    }
29
+	for ($i = 0; $i < 10; $i++) {
30
+    	for ($j = 0; $j < 10; $j++) {
31
+        	// Just a comment
32
+    	}
33 33
 }
34 34
 
35
-foreach ($foo as $bar) {}
35
+	foreach ($foo as $bar) {}
36 36
 
37
-foreach ($foo as $bar) {
38
-    $bar *= 2;
37
+	foreach ($foo as $bar) {
38
+    	$bar *= 2;
39 39
 }
40 40
 
41
-do {
42
-    // Just a comment
43
-    // Just another comment
41
+	do {
42
+    	// Just a comment
43
+    	// Just another comment
44 44
 } while ($foo);
45 45
 
46
-do {
47
-    while ($bar) {
46
+	do {
47
+    	while ($bar) {
48 48
         
49
-    }
49
+    	}
50 50
 } while (true);
51 51
 
52
-while ($foo) { /* Comment in the same line */ }
52
+	while ($foo) { /* Comment in the same line */ }
53 53
 
54
-while ($foo) {
55
-    try {
54
+	while ($foo) {
55
+    	try {
56 56
         
57
-    } catch (Exception $e) {
58
-        echo $e->getTraceAsString();
59
-    }
57
+    	} catch (Exception $e) {
58
+        	echo $e->getTraceAsString();
59
+    	}
60 60
 }
61 61
 
62
-try {
63
-    throw Exception('Error...');
62
+	try {
63
+    	throw Exception('Error...');
64 64
 } catch (Exception $e) {}
65 65
 
66
-try {
67
-    throw Exception('Error...');
66
+	try {
67
+    	throw Exception('Error...');
68 68
 } catch (Exception $e) {
69
-    // TODO: Handle this exception later :-)
69
+    	// TODO: Handle this exception later :-)
70 70
 }
71 71
 
72
-if (true) {} elseif (false) {}
72
+	if (true) {} elseif (false) {}
73 73
 
74
-match($foo) {};
74
+	match($foo) {};
Please login to merge, or discard this patch.