Completed
Pull Request — develop (#1492)
by Zack
17:43
created
Standards/Generic/Tests/CodeAnalysis/UselessOverridingMethodUnitTest.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
-            4  => 1,
45
-            16 => 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
+			16 => 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 UselessOverridingMethodUnitTest extends AbstractSniffUnitTest
15
-{
14
+class UselessOverridingMethodUnitTest 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
             4  => 1,
45 42
             16 => 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/EmptyPHPStatementUnitTest.php 3 patches
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -15,47 +15,47 @@
 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
-            9  => 1,
45
-            12 => 1,
46
-            15 => 1,
47
-            18 => 1,
48
-            21 => 1,
49
-            22 => 1,
50
-            31 => 1,
51
-            33 => 1,
52
-            43 => 1,
53
-            45 => 1,
54
-            49 => 1,
55
-            50 => 1,
56
-        ];
57
-
58
-    }//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
+			9  => 1,
45
+			12 => 1,
46
+			15 => 1,
47
+			18 => 1,
48
+			21 => 1,
49
+			22 => 1,
50
+			31 => 1,
51
+			33 => 1,
52
+			43 => 1,
53
+			45 => 1,
54
+			49 => 1,
55
+			50 => 1,
56
+		];
57
+
58
+	}//end getWarningList()
59 59
 
60 60
 
61 61
 }//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 EmptyPHPStatementUnitTest extends AbstractSniffUnitTest
15
-{
14
+class EmptyPHPStatementUnitTest 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
             9  => 1,
45 42
             12 => 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.
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.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 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()) {
12
+$it = new ArrayIterator( $a );
13
+for ( $it->rewind(); $it->valid(); $it->next() ) {
14 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/UnnecessaryFinalModifierUnitTest.php 3 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -15,39 +15,39 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
 
18
-    /**
19
-     * Returns the lines where errors should occur.
20
-     *
21
-     * The key of the array should represent the line number and the value
22
-     * should represent the number of errors that should occur on that line.
23
-     *
24
-     * @return array<int, int>
25
-     */
26
-    public function getErrorList()
27
-    {
28
-        return [];
29
-
30
-    }//end getErrorList()
31
-
32
-
33
-    /**
34
-     * Returns the lines where warnings should occur.
35
-     *
36
-     * The key of the array should represent the line number and the value
37
-     * should represent the number of warnings that should occur on that line.
38
-     *
39
-     * @return array<int, int>
40
-     */
41
-    public function getWarningList()
42
-    {
43
-        return [
44
-            11 => 1,
45
-            12 => 1,
46
-            15 => 1,
47
-            18 => 1,
48
-        ];
49
-
50
-    }//end getWarningList()
18
+	/**
19
+	 * Returns the lines where errors should occur.
20
+	 *
21
+	 * The key of the array should represent the line number and the value
22
+	 * should represent the number of errors that should occur on that line.
23
+	 *
24
+	 * @return array<int, int>
25
+	 */
26
+	public function getErrorList()
27
+	{
28
+		return [];
29
+
30
+	}//end getErrorList()
31
+
32
+
33
+	/**
34
+	 * Returns the lines where warnings should occur.
35
+	 *
36
+	 * The key of the array should represent the line number and the value
37
+	 * should represent the number of warnings that should occur on that line.
38
+	 *
39
+	 * @return array<int, int>
40
+	 */
41
+	public function getWarningList()
42
+	{
43
+		return [
44
+			11 => 1,
45
+			12 => 1,
46
+			15 => 1,
47
+			18 => 1,
48
+		];
49
+
50
+	}//end getWarningList()
51 51
 
52 52
 
53 53
 }//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 UnnecessaryFinalModifierUnitTest extends AbstractSniffUnitTest
15
-{
14
+class UnnecessaryFinalModifierUnitTest 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
             11 => 1,
45 42
             12 => 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.
Standards/Generic/Tests/CodeAnalysis/ForLoopShouldBeWhileLoopUnitTest.inc 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 for ($i = 0; $i < 10; $i++) {
3
-    // Everything is fine
3
+	// Everything is fine
4 4
 }
5 5
 
6 6
 for (; $it->valid();) {
7
-    $it->next();
7
+	$it->next();
8 8
 }
9 9
 
10 10
 for (;(($it1->valid() && $foo) || (!$it2->value && ($bar || false)));/*Could be ignored*/) {
11
-    $it1->next();
12
-    $it2->next();
11
+	$it1->next();
12
+	$it2->next();
13 13
 }
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2
-for ($i = 0; $i < 10; $i++) {
2
+for ( $i = 0; $i < 10; $i++ ) {
3 3
     // Everything is fine
4 4
 }
5 5
 
6
-for (; $it->valid();) {
6
+for ( ; $it->valid(); ) {
7 7
     $it->next();
8 8
 }
9 9
 
10
-for (;(($it1->valid() && $foo) || (!$it2->value && ($bar || false)));/*Could be ignored*/) {
10
+for ( ;( ( $it1->valid() && $foo ) || ( ! $it2->value && ( $bar || false ) ) ); /*Could be ignored*/ ) {
11 11
     $it1->next();
12 12
     $it2->next();
13 13
 }
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Standards/Generic/Tests/CodeAnalysis/UnconditionalIfStatementUnitTest.inc 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (true) {
3
+if ( true ) {
4 4
 
5
-} else if (false) {
5
+} else if ( false ) {
6 6
     
7
-} elseif (true) {
7
+} elseif ( true ) {
8 8
     
9 9
 }
10 10
 
11
-if (file_exists(__FILE__) === true) {
11
+if ( file_exists( __FILE__ ) === true ) {
12 12
     
13 13
 }
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
src/Standards/Generic/Tests/CodeAnalysis/EmptyStatementUnitTest.inc 4 patches
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) {}
73 73
\ No newline at end of file
Please login to merge, or discard this patch.
Switch Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-switch ($foo) {
3
+switch ( $foo ) {
4 4
     // Empty switch statement body 
5 5
 }
6 6
 
7
-switch ($foo) {
7
+switch ( $foo ) {
8 8
     case 'bar':
9 9
         break;
10 10
     default:
@@ -12,61 +12,61 @@  discard block
 block discarded – undo
12 12
 }
13 13
 
14 14
 
15
-if ($foo) {
15
+if ( $foo ) {
16 16
     // Just a comment
17
-} elseif ($bar) {
17
+} elseif ( $bar ) {
18 18
     // Yet another comment 
19 19
 } else {
20 20
     
21 21
 }
22 22
 
23
-if ($foo) {
23
+if ( $foo ) {
24 24
     $foo = 'bar';
25
-} else if ($bar) {
25
+} else if ( $bar ) {
26 26
     $bar = 'foo';
27 27
 }
28 28
 
29
-for ($i = 0; $i < 10; $i++) {
30
-    for ($j = 0; $j < 10; $j++) {
29
+for ( $i = 0; $i < 10; $i++ ) {
30
+    for ( $j = 0; $j < 10; $j++ ) {
31 31
         // Just a comment
32 32
     }
33 33
 }
34 34
 
35
-foreach ($foo as $bar) {}
35
+foreach ( $foo as $bar ) {}
36 36
 
37
-foreach ($foo as $bar) {
37
+foreach ( $foo as $bar ) {
38 38
     $bar *= 2;
39 39
 }
40 40
 
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
-    while ($bar) {
47
+    while ( $bar ) {
48 48
         
49 49
     }
50
-} while (true);
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) {
54
+while ( $foo ) {
55 55
     try {
56 56
         
57
-    } catch (Exception $e) {
57
+    } catch ( Exception $e ) {
58 58
         echo $e->getTraceAsString();
59 59
     }
60 60
 }
61 61
 
62 62
 try {
63
-    throw Exception('Error...');
64
-} catch (Exception $e) {}
63
+    throw Exception( 'Error...' );
64
+} catch ( Exception $e ) {}
65 65
 
66 66
 try {
67
-    throw Exception('Error...');
68
-} catch (Exception $e) {
67
+    throw Exception( 'Error...' );
68
+} catch ( Exception $e ) {
69 69
     // TODO: Handle this exception later :-)
70 70
 }
71 71
 
72
-if (true) {} elseif (false) {}
73 72
\ No newline at end of file
73
+if ( true ) {} elseif ( false ) {}
74 74
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,8 @@
 block discarded – undo
49 49
     }
50 50
 } while (true);
51 51
 
52
-while ($foo) { /* Comment in the same line */ }
52
+while ($foo) {
53
+/* Comment in the same line */ }
53 54
 
54 55
 while ($foo) {
55 56
     try {
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.
Spacing   +8 added lines, -8 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);
4
+    public function __construct( $a, $b ) {
5
+        parent::__construct( $a, $b );
6 6
     }
7 7
 }
8 8
 
9 9
 class BarFoo {
10
-    public function __construct($a, $b) {
11
-        parent::__construct($a, 'XML', $b);
10
+    public function __construct( $a, $b ) {
11
+        parent::__construct( $a, 'XML', $b );
12 12
     }
13 13
 }
14 14
 
15 15
 class Foo {
16
-    public function export($a, $b = null) {
17
-        return parent::export($a, $b);
16
+    public function export( $a, $b = null ) {
17
+        return parent::export( $a, $b );
18 18
     }
19 19
 }
20 20
 
21 21
 class Bar {
22
-    public function export($a, $b = null) {
23
-        return parent::export($a);
22
+    public function export( $a, $b = null ) {
23
+        return parent::export( $a );
24 24
     }
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
Standards/Generic/Tests/CodeAnalysis/UnusedFunctionParameterUnitTest.inc 4 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -1,48 +1,48 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 function foo($a, $b) {
4
-    return $a * 2;
4
+	return $a * 2;
5 5
 }
6 6
 
7 7
 function baz($a, $b) {
8
-    echo "baz({$a});";
8
+	echo "baz({$a});";
9 9
 }
10 10
 
11 11
 function bar($a, $b) {
12
-    $x = $b;
13
-    for ($i = 0; $i <$a; $i++) {
14
-        $x += $a * $i;
15
-    }
16
-    return $x;
12
+	$x = $b;
13
+	for ($i = 0; $i <$a; $i++) {
14
+		$x += $a * $i;
15
+	}
16
+	return $x;
17 17
 }
18 18
 
19 19
 function foobar($a, &$b) {
20
-    return (preg_match('/foo/', $a, $b) !== 0);
20
+	return (preg_match('/foo/', $a, $b) !== 0);
21 21
 }
22 22
 
23 23
 class Foo implements Bar {
24
-    function barfoo($a, $b) {
25
-        // Empty body means interface method in many cases.
26
-    }
24
+	function barfoo($a, $b) {
25
+		// Empty body means interface method in many cases.
26
+	}
27 27
 
28
-    function fooBar($a, $b) {
29
-        return;
30
-    }
28
+	function fooBar($a, $b) {
29
+		return;
30
+	}
31 31
 }
32 32
 
33 33
 function foo($bar)
34 34
 {
35
-    print <<<BAZ
35
+	print <<<BAZ
36 36
     $bar
37 37
 BAZ;
38 38
 }
39 39
 
40 40
 function foo( $parameter ) {
41
-    $wango = <<<HERE
41
+	$wango = <<<HERE
42 42
 1 Must be a HEREdoc of at least one line
43 43
 HERE;
44
-    $x = $parameter; // This line must be immediately after the HERE; with no intervening blank lines.
45
-    $tango = <<<HERE
44
+	$x = $parameter; // This line must be immediately after the HERE; with no intervening blank lines.
45
+	$tango = <<<HERE
46 46
 1 Must be a HEREdoc
47 47
 2 
48 48
 3 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 }
57 57
 
58 58
 function foo( $parameter ) {
59
-    return <<<HTML
59
+	return <<<HTML
60 60
 <?xml version="1.0"?>
61 61
 <value>$parameter</value>
62 62
 HTML;
@@ -67,20 +67,20 @@  discard block
 block discarded – undo
67 67
 
68 68
 function foo($bar)
69 69
 {
70
-    print "${bar} things\n";
70
+	print "${bar} things\n";
71 71
 }
72 72
 
73 73
 function bar($x)
74 74
 {
75
-    return 2 * ${x};
75
+	return 2 * ${x};
76 76
 }
77 77
 
78 78
 $foo = function ($a, $b) {
79
-    return $a * 2;
79
+	return $a * 2;
80 80
 };
81 81
 
82 82
 function foobar() {
83
-    return;
83
+	return;
84 84
 }
85 85
 
86 86
 
@@ -91,21 +91,21 @@  discard block
 block discarded – undo
91 91
  */
92 92
 
93 93
 class MyClass {
94
-    public function something($a, $b) {
95
-        return $a * 2;
96
-    }
94
+	public function something($a, $b) {
95
+		return $a * 2;
96
+	}
97 97
 }
98 98
 
99 99
 class MyExtendedClass extends SomeClass {
100
-    public function something($a, $b) {
101
-        return $a * 2;
102
-    }
100
+	public function something($a, $b) {
101
+		return $a * 2;
102
+	}
103 103
 }
104 104
 
105 105
 class MyExtendedClass implements SomeInterface {
106
-    public function something($a, $b) {
107
-        return $a * 2;
108
-    }
106
+	public function something($a, $b) {
107
+		return $a * 2;
108
+	}
109 109
 }
110 110
 
111 111
 
@@ -115,9 +115,9 @@  discard block
 block discarded – undo
115 115
  */
116 116
 
117 117
 function something($a) {
118
-    return 'foobar';
118
+	return 'foobar';
119 119
 }
120 120
 
121 121
 function myCallback($a, $b, $c, $d) {
122
-    return $a * $c;
122
+	return $a * $c;
123 123
 }
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,36 +1,36 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-function foo($a, $b) {
3
+function foo( $a, $b ) {
4 4
     return $a * 2;
5 5
 }
6 6
 
7
-function baz($a, $b) {
7
+function baz( $a, $b ) {
8 8
     echo "baz({$a});";
9 9
 }
10 10
 
11
-function bar($a, $b) {
11
+function bar( $a, $b ) {
12 12
     $x = $b;
13
-    for ($i = 0; $i <$a; $i++) {
13
+    for ( $i = 0; $i < $a; $i++ ) {
14 14
         $x += $a * $i;
15 15
     }
16 16
     return $x;
17 17
 }
18 18
 
19
-function foobar($a, &$b) {
20
-    return (preg_match('/foo/', $a, $b) !== 0);
19
+function foobar( $a, &$b ) {
20
+    return ( preg_match( '/foo/', $a, $b ) !== 0 );
21 21
 }
22 22
 
23 23
 class Foo implements Bar {
24
-    function barfoo($a, $b) {
24
+    function barfoo( $a, $b ) {
25 25
         // Empty body means interface method in many cases.
26 26
     }
27 27
 
28
-    function fooBar($a, $b) {
28
+    function fooBar( $a, $b ) {
29 29
         return;
30 30
     }
31 31
 }
32 32
 
33
-function foo($bar)
33
+function foo( $bar )
34 34
 {
35 35
     print <<<BAZ
36 36
     $bar
@@ -65,17 +65,17 @@  discard block
 block discarded – undo
65 65
 print foo( 'PARAMETER' );
66 66
 print "\n";
67 67
 
68
-function foo($bar)
68
+function foo( $bar )
69 69
 {
70 70
     print "${bar} things\n";
71 71
 }
72 72
 
73
-function bar($x)
73
+function bar( $x )
74 74
 {
75 75
     return 2 * ${x};
76 76
 }
77 77
 
78
-$foo = function ($a, $b) {
78
+$foo = function( $a, $b ) {
79 79
     return $a * 2;
80 80
 };
81 81
 
@@ -91,19 +91,19 @@  discard block
 block discarded – undo
91 91
  */
92 92
 
93 93
 class MyClass {
94
-    public function something($a, $b) {
94
+    public function something( $a, $b ) {
95 95
         return $a * 2;
96 96
     }
97 97
 }
98 98
 
99 99
 class MyExtendedClass extends SomeClass {
100
-    public function something($a, $b) {
100
+    public function something( $a, $b ) {
101 101
         return $a * 2;
102 102
     }
103 103
 }
104 104
 
105 105
 class MyExtendedClass implements SomeInterface {
106
-    public function something($a, $b) {
106
+    public function something( $a, $b ) {
107 107
         return $a * 2;
108 108
     }
109 109
 }
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
  * Report different violations for params *before* and *after* the last param used.
115 115
  */
116 116
 
117
-function something($a) {
117
+function something( $a ) {
118 118
     return 'foobar';
119 119
 }
120 120
 
121
-function myCallback($a, $b, $c, $d) {
121
+function myCallback( $a, $b, $c, $d ) {
122 122
     return $a * $c;
123 123
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@  discard block
 block discarded – undo
30 30
     }
31 31
 }
32 32
 
33
-function foo($bar)
34
-{
33
+function foo($bar) {
35 34
     print <<<BAZ
36 35
     $bar
37 36
 BAZ;
@@ -65,13 +64,11 @@  discard block
 block discarded – undo
65 64
 print foo( 'PARAMETER' );
66 65
 print "\n";
67 66
 
68
-function foo($bar)
69
-{
67
+function foo($bar) {
70 68
     print "${bar} things\n";
71 69
 }
72 70
 
73
-function bar($x)
74
-{
71
+function bar($x) {
75 72
     return 2 * ${x};
76 73
 }
77 74
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 {
35 35
     print <<<BAZ
36 36
     $bar
37
-BAZ;
37
+baz;
38 38
 }
39 39
 
40 40
 function foo( $parameter ) {
41 41
     $wango = <<<HERE
42 42
 1 Must be a HEREdoc of at least one line
43
-HERE;
43
+here;
44 44
     $x = $parameter; // This line must be immediately after the HERE; with no intervening blank lines.
45 45
     $tango = <<<HERE
46 46
 1 Must be a HEREdoc
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
 7
53 53
 8 
54 54
 9 at least 9 lines long
55
-HERE;
55
+here;
56 56
 }
57 57
 
58 58
 function foo( $parameter ) {
59 59
     return <<<HTML
60 60
 <?xml version="1.0"?>
61 61
 <value>$parameter</value>
62
-HTML;
62
+html;
63 63
 }
64 64
 
65 65
 print foo( 'PARAMETER' );
Please login to merge, or discard this patch.