Completed
Pull Request — master (#7)
by Tomáš
09:48 queued 03:17
created
src/Standards/Squiz/Sniffs/ControlStructures/ForLoopDeclarationSniff.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
      * @var array
51 51
      */
52 52
     public $supportedTokenizers = array(
53
-                                   'PHP',
54
-                                   'JS',
55
-                                  );
53
+                                    'PHP',
54
+                                    'JS',
55
+                                    );
56 56
 
57 57
 
58 58
     /**
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
             if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) {
107 107
                 $error = 'Expected %s spaces after opening bracket; %s found';
108 108
                 $data  = array(
109
-                          $this->requiredSpacesAfterOpen,
110
-                          $spaceAfterOpen,
111
-                         );
109
+                            $this->requiredSpacesAfterOpen,
110
+                            $spaceAfterOpen,
111
+                            );
112 112
                 $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data);
113 113
                 if ($fix === true) {
114 114
                     $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
             if ($this->requiredSpacesBeforeClose !== $spaceBeforeClose) {
137 137
                 $error = 'Expected %s spaces before closing bracket; %s found';
138 138
                 $data  = array(
139
-                          $this->requiredSpacesBeforeClose,
140
-                          $spaceBeforeClose,
141
-                         );
139
+                            $this->requiredSpacesBeforeClose,
140
+                            $spaceBeforeClose,
141
+                            );
142 142
                 $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeClose', $data);
143 143
                 if ($fix === true) {
144 144
                     $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
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                           $this->requiredSpacesAfterOpen,
110 110
                           $spaceAfterOpen,
111 111
                          );
112
-                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data);
112
+                $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data);
113 113
                 if ($fix === true) {
114 114
                     $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
115 115
                     if ($spaceAfterOpen === 0) {
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                           $this->requiredSpacesBeforeClose,
140 140
                           $spaceBeforeClose,
141 141
                          );
142
-                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeClose', $data);
142
+                $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBeforeClose', $data);
143 143
                 if ($fix === true) {
144 144
                     $padding = str_repeat(' ', $this->requiredSpacesBeforeClose);
145 145
                     if ($spaceBeforeClose === 0) {
Please login to merge, or discard this patch.
src/Standards/Squiz/Sniffs/ControlStructures/SwitchDeclarationSniff.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
      * @var array
38 38
      */
39 39
     public $supportedTokenizers = array(
40
-                                   'PHP',
41
-                                   'JS',
42
-                                  );
40
+                                    'PHP',
41
+                                    'JS',
42
+                                    );
43 43
 
44 44
     /**
45 45
      * The number of spaces code should be indented.
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
                 $expected = strtolower($tokens[$nextCase]['content']);
107 107
                 $error    = strtoupper($type).' keyword must be lowercase; expected "%s" but found "%s"';
108 108
                 $data     = array(
109
-                             $expected,
110
-                             $tokens[$nextCase]['content'],
109
+                                $expected,
110
+                                $tokens[$nextCase]['content'],
111 111
                             );
112 112
 
113 113
                 $fix = $phpcsFile->addFixableError($error, $nextCase, $type.'NotLower', $data);
Please login to merge, or discard this patch.
Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
             if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) {
104 104
                 $error = 'Expected %s spaces after opening bracket; %s found';
105 105
                 $data  = array(
106
-                          $this->requiredSpacesAfterOpen,
107
-                          $spaceAfterOpen,
108
-                         );
106
+                            $this->requiredSpacesAfterOpen,
107
+                            $spaceAfterOpen,
108
+                            );
109 109
                 $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data);
110 110
                 if ($fix === true) {
111 111
                     $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
             if ($spaceBeforeClose !== $this->requiredSpacesBeforeClose) {
134 134
                 $error = 'Expected %s spaces before closing bracket; %s found';
135 135
                 $data  = array(
136
-                          $this->requiredSpacesBeforeClose,
137
-                          $spaceBeforeClose,
138
-                         );
136
+                            $this->requiredSpacesBeforeClose,
137
+                            $spaceBeforeClose,
138
+                            );
139 139
                 $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeClose', $data);
140 140
                 if ($fix === true) {
141 141
                     $padding = str_repeat(' ', $this->requiredSpacesBeforeClose);
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
             $expected = strtolower($content);
161 161
             $error    = 'AS keyword must be lowercase; expected "%s" but found "%s"';
162 162
             $data     = array(
163
-                         $expected,
164
-                         $content,
163
+                            $expected,
164
+                            $content,
165 165
                         );
166 166
 
167 167
             $fix = $phpcsFile->addFixableError($error, $asToken, 'AsNotLower', $data);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                           $this->requiredSpacesAfterOpen,
107 107
                           $spaceAfterOpen,
108 108
                          );
109
-                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data);
109
+                $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data);
110 110
                 if ($fix === true) {
111 111
                     $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
112 112
                     if ($spaceAfterOpen === 0) {
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                           $this->requiredSpacesBeforeClose,
137 137
                           $spaceBeforeClose,
138 138
                          );
139
-                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeClose', $data);
139
+                $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeClose', $data);
140 140
                 if ($fix === true) {
141 141
                     $padding = str_repeat(' ', $this->requiredSpacesBeforeClose);
142 142
                     if ($spaceBeforeClose === 0) {
Please login to merge, or discard this patch.
src/Standards/Squiz/Sniffs/NamingConventions/ValidVariableNameSniff.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     private $_ignore = array(
43 43
                         T_WHITESPACE,
44 44
                         T_COMMENT,
45
-                       );
45
+                        );
46 46
 
47 47
 
48 48
     /**
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                             'http_response_header',
73 73
                             'HTTP_RAW_POST_DATA',
74 74
                             'php_errormsg',
75
-                           );
75
+                            );
76 76
 
77 77
         // If it's a php reserved var, then its ok.
78 78
         if (in_array($varName, $phpReservedVars) === true) {
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
             if (substr($varName, 0, 1) === '_') {
164 164
                 $error = '%s member variable "%s" must not contain a leading underscore';
165 165
                 $data  = array(
166
-                          ucfirst($memberProps['scope']),
167
-                          $errorData[0],
168
-                         );
166
+                            ucfirst($memberProps['scope']),
167
+                            $errorData[0],
168
+                            );
169 169
                 $phpcsFile->addError($error, $stackPtr, 'PublicHasUnderscore', $data);
170 170
                 return;
171 171
             }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
                             'http_response_header',
212 212
                             'HTTP_RAW_POST_DATA',
213 213
                             'php_errormsg',
214
-                           );
214
+                            );
215 215
 
216 216
         if (preg_match_all('|[^\\\]\${?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)|', $tokens[$stackPtr]['content'], $matches) !== 0) {
217 217
             foreach ($matches[1] as $varName) {
Please login to merge, or discard this patch.
src/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@
 block discarded – undo
34 34
      * @var array
35 35
      */
36 36
     public $supportedTokenizers = array(
37
-                                   'PHP',
38
-                                   'JS',
39
-                                  );
37
+                                    'PHP',
38
+                                    'JS',
39
+                                    );
40 40
 
41 41
 
42 42
     /**
Please login to merge, or discard this patch.
src/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -124,9 +124,9 @@
 block discarded – undo
124 124
         if ($content !== strtolower($content)) {
125 125
             $error = 'Calls to inbuilt PHP functions must be lowercase; expected "%s" but found "%s"';
126 126
             $data  = array(
127
-                      strtolower($content),
128
-                      $content,
129
-                     );
127
+                        strtolower($content),
128
+                        $content,
129
+                        );
130 130
 
131 131
             $fix = $phpcsFile->addFixableError($error, $stackPtr, 'CallUppercase', $data);
132 132
             if ($fix === true) {
Please login to merge, or discard this patch.
src/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@
 block discarded – undo
41 41
      * @var array(string => string|null)
42 42
      */
43 43
     public $forbiddenFunctions = array(
44
-                                  'error_log' => null,
45
-                                  'print_r'   => null,
46
-                                  'var_dump'  => null,
47
-                                 );
44
+                                    'error_log' => null,
45
+                                    'print_r'   => null,
46
+                                    'var_dump'  => null,
47
+                                    );
48 48
 
49 49
     /**
50 50
      * If true, an error will be thrown; otherwise a warning.
Please login to merge, or discard this patch.
src/Standards/Squiz/Sniffs/PHP/HeredocSniff.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 48 => 1,
58 58
                 70 => 1,
59 59
                 71 => 1,
60
-               );
60
+                );
61 61
 
62 62
     }//end getErrorList()
63 63
 
Please login to merge, or discard this patch.
src/Standards/Squiz/Sniffs/PHP/ForbiddenFunctionsSniff.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@
 block discarded – undo
44 44
      * @var array(string => string|null)
45 45
      */
46 46
     public $forbiddenFunctions = array(
47
-                                  'sizeof'          => 'count',
48
-                                  'delete'          => 'unset',
49
-                                  'print'           => 'echo',
50
-                                  'is_null'         => null,
51
-                                  'create_function' => null,
52
-                                 );
47
+                                    'sizeof'          => 'count',
48
+                                    'delete'          => 'unset',
49
+                                    'print'           => 'echo',
50
+                                    'is_null'         => null,
51
+                                    'create_function' => null,
52
+                                    );
53 53
 
54 54
 }//end class
Please login to merge, or discard this patch.