Completed
Pull Request — master (#1)
by Tomáš
10:05 queued 03:46
created
Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                 T_ELSEIF,
63 63
                 T_TRY,
64 64
                 T_CATCH,
65
-               );
65
+                );
66 66
 
67 67
     }//end register()
68 68
 
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
         if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) {
105 105
             $error = 'Expected %s spaces after opening bracket; %s found';
106 106
             $data  = array(
107
-                      $this->requiredSpacesAfterOpen,
108
-                      $spaceAfterOpen,
109
-                     );
107
+                        $this->requiredSpacesAfterOpen,
108
+                        $spaceAfterOpen,
109
+                        );
110 110
             $fix   = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data);
111 111
             if ($fix === true) {
112 112
                 $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
             if ($spaceBeforeClose !== $this->requiredSpacesBeforeClose) {
132 132
                 $error = 'Expected %s spaces before closing bracket; %s found';
133 133
                 $data  = array(
134
-                          $this->requiredSpacesBeforeClose,
135
-                          $spaceBeforeClose,
136
-                         );
134
+                            $this->requiredSpacesBeforeClose,
135
+                            $spaceBeforeClose,
136
+                            );
137 137
                 $fix   = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data);
138 138
                 if ($fix === true) {
139 139
                     $padding = str_repeat(' ', $this->requiredSpacesBeforeClose);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                       $this->requiredSpacesAfterOpen,
108 108
                       $spaceAfterOpen,
109 109
                      );
110
-            $fix   = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data);
110
+            $fix = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data);
111 111
             if ($fix === true) {
112 112
                 $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
113 113
                 if ($spaceAfterOpen === 0) {
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                           $this->requiredSpacesBeforeClose,
135 135
                           $spaceBeforeClose,
136 136
                          );
137
-                $fix   = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data);
137
+                $fix = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data);
138 138
                 if ($fix === true) {
139 139
                     $padding = str_repeat(' ', $this->requiredSpacesBeforeClose);
140 140
                     if ($spaceBeforeClose === 0) {
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Sniffs/Methods/MethodDeclarationSniff.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -80,18 +80,18 @@
 block discarded – undo
80 80
         $prefix = $stackPtr;
81 81
         while (($prefix = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$methodPrefixes, ($prefix - 1), $prev)) !== false) {
82 82
             switch ($tokens[$prefix]['code']) {
83
-            case T_STATIC:
84
-                $static = $prefix;
85
-                break;
86
-            case T_ABSTRACT:
87
-                $abstract = $prefix;
88
-                break;
89
-            case T_FINAL:
90
-                $final = $prefix;
91
-                break;
92
-            default:
93
-                $visibility = $prefix;
94
-                break;
83
+                case T_STATIC:
84
+                    $static = $prefix;
85
+                    break;
86
+                case T_ABSTRACT:
87
+                    $abstract = $prefix;
88
+                    break;
89
+                case T_FINAL:
90
+                    $final = $prefix;
91
+                    break;
92
+                default:
93
+                    $visibility = $prefix;
94
+                    break;
95 95
             }
96 96
         }
97 97
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Tests/Classes/PropertyDeclarationUnitTest.inc 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@
 block discarded – undo
15 15
 
16 16
     public $foo, $bar, $var = null;
17 17
     public $foo,
18
-           $bar,
19
-           $var = null;
18
+            $bar,
19
+            $var = null;
20 20
 }
21 21
 
22 22
 class foo
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Tests/Classes/ClassDeclarationUnitTest.inc 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 }
18 18
 
19 19
 class ClassName extends  ParentClass  implements
20
-   \ArrayAccess,
20
+    \ArrayAccess,
21 21
         \Foo\Bar\Countable,
22 22
     \Serializable {
23 23
     // constants, properties, methods
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
 }
114 114
 
115 115
 interface MyInterface extends
116
- LongInterfaceName1,
116
+    LongInterfaceName1,
117 117
     LongInterfaceName2,
118
-     LongInterfaceName3,
118
+        LongInterfaceName3,
119 119
 LongInterfaceName4
120 120
 {
121 121
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2
-class ClassName extends ParentClass implements \ArrayAccess,  \Countable
2
+class ClassName extends ParentClass implements \ArrayAccess, \Countable
3 3
 {
4 4
     // constants, properties, methods
5 5
 }
6 6
 
7
-class ClassName extends ParentClass,AnotherParentClass implements \ArrayAccess,\Countable {
7
+class ClassName extends ParentClass, AnotherParentClass implements \ArrayAccess, \Countable {
8 8
     // constants, properties, methods
9 9
 }
10 10
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 }
61 61
 
62 62
 class ClassName extends ParentClass implements
63
-    \Foo\Bar\Countable ,
63
+    \Foo\Bar\Countable,
64 64
     \Serializable
65 65
 {
66 66
     // constants, properties, methods
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
 class ClassName implements
129 129
 
130
-    \ArrayAccess,\Countable,
130
+    \ArrayAccess, \Countable,
131 131
 \Serializable
132 132
 {
133 133
     // constants, properties, methods
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,9 @@
 block discarded – undo
69 69
 class Test
70 70
 {
71 71
     public function test() {
72
-        if (1) 1;
72
+        if (1) {
73
+            1;
74
+        }
73 75
         1 ? (1 ? 1 : 1) : 1;
74 76
     }
75 77
 }
Please login to merge, or discard this patch.
Standards/PSR2/Tests/ControlStructures/ControlStructureSpacingUnitTest.inc 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 if ($something) {
3 3
 }
4
-foreach ($this as $that ) {
4
+foreach ($this as $that) {
5 5
 }
6 6
 while (true) {
7 7
     for ($i = 0; $i < 10; $i++) {
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
     foreach ($this as $that) {
13 13
         do {
14
-        } while ( true );
14
+        } while (true);
15 15
 
16 16
     }
17 17
 }
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
     $settingsUpdated = FALSE;
24 24
 }
25 25
 
26
-foreach ( $blah as $var ) {
27
-    if (  $blah    ) {
26
+foreach ($blah as $var) {
27
+    if ($blah) {
28 28
     }
29 29
 }
30 30
 
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 // @codingStandardsChangeSetting PSR2.ControlStructures.ControlStructureSpacing requiredSpacesAfterOpen 1
40 40
 // @codingStandardsChangeSetting PSR2.ControlStructures.ControlStructureSpacing requiredSpacesBeforeClose 1
41 41
 foreach ($something as $blah => $that) {}
42
-foreach ( $something as $blah => $that ) {}
43
-foreach (  $something as $blah => $that  ) {}
42
+foreach ($something as $blah => $that) {}
43
+foreach ($something as $blah => $that) {}
44 44
 // @codingStandardsChangeSetting PSR2.ControlStructures.ControlStructureSpacing requiredSpacesAfterOpen 0
45 45
 // @codingStandardsChangeSetting PSR2.ControlStructures.ControlStructureSpacing requiredSpacesBeforeClose 0
46 46
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Tests/Files/EndFileNewlineUnitTest.php 3 patches
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -43,17 +43,17 @@
 block discarded – undo
43 43
     public function getErrorList($testFile='')
44 44
     {
45 45
         switch ($testFile) {
46
-        case 'EndFileNewlineUnitTest.1.inc':
47
-        case 'EndFileNewlineUnitTest.3.inc':
48
-        case 'EndFileNewlineUnitTest.6.inc':
49
-        case 'EndFileNewlineUnitTest.7.inc':
50
-            return array(
51
-                    2 => 1,
52
-                   );
53
-            break;
54
-        default:
55
-            return array();
56
-            break;
46
+            case 'EndFileNewlineUnitTest.1.inc':
47
+            case 'EndFileNewlineUnitTest.3.inc':
48
+            case 'EndFileNewlineUnitTest.6.inc':
49
+            case 'EndFileNewlineUnitTest.7.inc':
50
+                return array(
51
+                        2 => 1,
52
+                       );
53
+                break;
54
+            default:
55
+                return array();
56
+                break;
57 57
         }//end switch
58 58
 
59 59
     }//end getErrorList()
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         case 'CharacterBeforePHPOpeningTagUnitTest.1.inc':
47 47
             return array(
48 48
                     2 => 1,
49
-                   );
49
+                    );
50 50
             break;
51 51
         default:
52 52
             return array();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      *
41 41
      * @return array<int, int>
42 42
      */
43
-    public function getErrorList($testFile='')
43
+    public function getErrorList($testFile = '')
44 44
     {
45 45
         switch ($testFile) {
46 46
         case 'EndFileNoNewlineUnitTest.1.inc':
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      *
76 76
      * @return array<int, int>
77 77
      */
78
-    public function getWarningList($testFile='')
78
+    public function getWarningList($testFile = '')
79 79
     {
80 80
         return array();
81 81
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Tests/Files/ClosingTagUnitTest.php 2 patches
Switch Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,15 +43,15 @@
 block discarded – undo
43 43
     public function getErrorList($testFile='')
44 44
     {
45 45
         switch ($testFile) {
46
-        case 'ClosingTagUnitTest.1.inc':
47
-            return array(11 => 1);
46
+            case 'ClosingTagUnitTest.1.inc':
47
+                return array(11 => 1);
48 48
 
49
-        case 'ClosingTagUnitTest.4.inc':
50
-        case 'ClosingTagUnitTest.5.inc':
51
-            return array(1 => 1);
49
+            case 'ClosingTagUnitTest.4.inc':
50
+            case 'ClosingTagUnitTest.5.inc':
51
+                return array(1 => 1);
52 52
 
53
-        default:
54
-            return array();
53
+            default:
54
+                return array();
55 55
         }
56 56
 
57 57
     }//end getErrorList()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      *
41 41
      * @return array<int, int>
42 42
      */
43
-    public function getErrorList($testFile='')
43
+    public function getErrorList($testFile = '')
44 44
     {
45 45
         switch ($testFile) {
46 46
         case 'CharacterBeforePHPOpeningTagUnitTest.1.inc':
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.inc 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 ], $baz);
7 7
 
8 8
 // ok
9
-$app->get('/hello/{name}', function ($name) use ($app) {
9
+$app->get('/hello/{name}', function($name) use ($app) {
10 10
     return 'Hello '.$app->escape($name);
11 11
 }, array(
12 12
     '1',
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     . 'text', 'string');
64 64
 
65 65
 foo(bar(), $a);
66
-foo();bar();
66
+foo(); bar();
67 67
 
68 68
 foo(
69 69
     true
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
 if (array_filter(
94 94
     $commands,
95
-    function ($cmd) use ($commandName) {
95
+    function($cmd) use ($commandName) {
96 96
         return ($cmd['name'] == $commandName);
97 97
     }
98 98
 )) {
@@ -101,14 +101,14 @@  discard block
 block discarded – undo
101 101
 
102 102
 myFunction(
103 103
     'foo', (object) array(
104
-        'bar' => function ($x) {
104
+        'bar' => function($x) {
105 105
             return true;
106 106
         },
107 107
         'baz' => false
108 108
     )
109 109
 );
110 110
 $qux = array_filter(
111
-    $quux, function ($x) {
111
+    $quux, function($x) {
112 112
         return $x;
113 113
     }
114 114
 );
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.php 3 patches
Switch Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -43,19 +43,19 @@
 block discarded – undo
43 43
     public function getErrorList($testFile='')
44 44
     {
45 45
         switch ($testFile) {
46
-        case 'UseDeclarationUnitTest.2.inc':
47
-            return array(
48
-                    4  => 1,
49
-                    5  => 1,
50
-                    10 => 2,
51
-                   );
52
-        case 'UseDeclarationUnitTest.3.inc':
53
-            return array(
54
-                    4 => 1,
55
-                    6 => 1,
56
-                   );
57
-        default:
58
-            return array();
46
+            case 'UseDeclarationUnitTest.2.inc':
47
+                return array(
48
+                        4  => 1,
49
+                        5  => 1,
50
+                        10 => 2,
51
+                       );
52
+            case 'UseDeclarationUnitTest.3.inc':
53
+                return array(
54
+                        4 => 1,
55
+                        6 => 1,
56
+                       );
57
+            default:
58
+                return array();
59 59
         }//end switch
60 60
 
61 61
     }//end getErrorList()
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,13 +47,13 @@
 block discarded – undo
47 47
             return array(
48 48
                     4 => 1,
49 49
                     5 => 1,
50
-                   );
50
+                    );
51 51
         } else if (version_compare(PHP_VERSION, '5.4.0RC1') >= 0) {
52 52
             // Shorthand echo is always available from PHP 5.4.0 but needed the
53 53
             // short_open_tag ini var to be set for versions before this.
54 54
             return array(
55 55
                     4 => 1,
56
-                   );
56
+                    );
57 57
         }
58 58
 
59 59
         return array();
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      *
41 41
      * @return array<int, int>
42 42
      */
43
-    public function getErrorList($testFile='')
43
+    public function getErrorList($testFile = '')
44 44
     {
45 45
         switch ($testFile) {
46 46
         case 'CharacterBeforePHPOpeningTagUnitTest.1.inc':
Please login to merge, or discard this patch.