Completed
Branch master (d87ed9)
by Tomáš
06:31
created
CodeSniffer/Standards/AbstractVariableSniff.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -67,17 +67,17 @@
 block discarded – undo
67 67
     public function __construct()
68 68
     {
69 69
         $scopes = array(
70
-                   T_CLASS,
71
-                   T_TRAIT,
72
-                   T_INTERFACE,
73
-                  );
70
+                    T_CLASS,
71
+                    T_TRAIT,
72
+                    T_INTERFACE,
73
+                    );
74 74
 
75 75
         $listen = array(
76
-                   T_FUNCTION,
77
-                   T_VARIABLE,
78
-                   T_DOUBLE_QUOTED_STRING,
79
-                   T_HEREDOC,
80
-                  );
76
+                    T_FUNCTION,
77
+                    T_VARIABLE,
78
+                    T_DOUBLE_QUOTED_STRING,
79
+                    T_HEREDOC,
80
+                    );
81 81
 
82 82
         parent::__construct($scopes, $listen, true);
83 83
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/AbstractPatternSniff.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
             $listenTypes[] = $tokenType;
115 115
 
116 116
             $patternArray = array(
117
-                             'listen_pos'   => $pos,
118
-                             'pattern'      => $parsedPattern,
119
-                             'pattern_code' => $pattern,
117
+                                'listen_pos'   => $pos,
118
+                                'pattern'      => $parsedPattern,
119
+                                'pattern_code' => $pattern,
120 120
                             );
121 121
 
122 122
             if (isset($this->_parsedPatterns[$tokenType]) === false) {
@@ -763,17 +763,17 @@  discard block
 block discarded – undo
763 763
     }//end registerSupplementary()
764 764
 
765 765
 
766
-     /**
767
-      * Processes any tokens registered with registerSupplementary().
768
-      *
769
-      * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where to
770
-      *                                        process the skip.
771
-      * @param int                  $stackPtr  The position in the tokens stack to
772
-      *                                        process.
773
-      *
774
-      * @return void
775
-      * @see    registerSupplementary()
776
-      */
766
+        /**
767
+         * Processes any tokens registered with registerSupplementary().
768
+         *
769
+         * @param PHP_CodeSniffer_File $phpcsFile The PHP_CodeSniffer file where to
770
+         *                                        process the skip.
771
+         * @param int                  $stackPtr  The position in the tokens stack to
772
+         *                                        process.
773
+         *
774
+         * @return void
775
+         * @see    registerSupplementary()
776
+         */
777 777
     protected function processSupplementary(
778 778
         PHP_CodeSniffer_File $phpcsFile,
779 779
         $stackPtr
@@ -948,10 +948,10 @@  discard block
 block discarded – undo
948 948
         $patterns = array();
949 949
         foreach ($tokens as $patternInfo) {
950 950
             $patterns[] = array(
951
-                           'type'  => 'token',
952
-                           'token' => $patternInfo['code'],
953
-                           'value' => $patternInfo['content'],
954
-                          );
951
+                            'type'  => 'token',
952
+                            'token' => $patternInfo['code'],
953
+                            'value' => $patternInfo['content'],
954
+                            );
955 955
         }
956 956
 
957 957
         return $patterns;
Please login to merge, or discard this patch.
Switch Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -890,26 +890,26 @@
 block discarded – undo
890 890
         $nestedBraces      = 0;
891 891
         for ($start = $from; $start >= 0; $start--) {
892 892
             switch ($pattern[$start]) {
893
-            case '(':
894
-                if ($nestedParenthesis === 0) {
895
-                    $skip['to'] = 'parenthesis_closer';
896
-                }
893
+                case '(':
894
+                    if ($nestedParenthesis === 0) {
895
+                        $skip['to'] = 'parenthesis_closer';
896
+                    }
897 897
 
898
-                $nestedParenthesis--;
899
-                break;
900
-            case '{':
901
-                if ($nestedBraces === 0) {
902
-                    $skip['to'] = 'scope_closer';
903
-                }
898
+                    $nestedParenthesis--;
899
+                    break;
900
+                case '{':
901
+                    if ($nestedBraces === 0) {
902
+                        $skip['to'] = 'scope_closer';
903
+                    }
904 904
 
905
-                $nestedBraces--;
906
-                break;
907
-            case '}':
908
-                $nestedBraces++;
909
-                break;
910
-            case ')':
911
-                $nestedParenthesis++;
912
-                break;
905
+                    $nestedBraces--;
906
+                    break;
907
+                case '}':
908
+                    $nestedBraces++;
909
+                    break;
910
+                case ')':
911
+                    $nestedParenthesis++;
912
+                    break;
913 913
             }//end switch
914 914
 
915 915
             if (isset($skip['to']) === true) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
      *
79 79
      * @param boolean $ignoreComments If true, comments will be ignored.
80 80
      */
81
-    public function __construct($ignoreComments=null)
81
+    public function __construct($ignoreComments = null)
82 82
     {
83 83
         // This is here for backwards compatibility.
84 84
         if ($ignoreComments !== null) {
Please login to merge, or discard this patch.
Standards/Zend/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) {
@@ -171,9 +171,9 @@  discard block
 block discarded – undo
171 171
                 $scope = ucfirst($memberProps['scope']);
172 172
                 $error = '%s member variable "%s" must contain a leading underscore';
173 173
                 $data  = array(
174
-                          $scope,
175
-                          $varName,
176
-                         );
174
+                            $scope,
175
+                            $varName,
176
+                            );
177 177
                 $phpcsFile->addError($error, $stackPtr, 'PrivateNoUnderscore', $data);
178 178
                 return;
179 179
             }
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                             'http_response_header',
219 219
                             'HTTP_RAW_POST_DATA',
220 220
                             'php_errormsg',
221
-                           );
221
+                            );
222 222
 
223 223
         if (preg_match_all('|[^\\\]\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)|', $tokens[$stackPtr]['content'], $matches) !== 0) {
224 224
             foreach ($matches[1] as $varName) {
Please login to merge, or discard this patch.
CodeSniffer/Standards/AbstractScopeSniff.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
     public function __construct(
87 87
         array $scopeTokens,
88 88
         array $tokens,
89
-        $listenOutside=false
89
+        $listenOutside = false
90 90
     ) {
91 91
         if (empty($scopeTokens) === true) {
92 92
             $error = 'The scope tokens list cannot be empty';
Please login to merge, or discard this patch.
CodeSniffer/Standards/PEAR/Sniffs/Classes/ClassDeclarationSniff.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
                 T_CLASS,
50 50
                 T_INTERFACE,
51 51
                 T_TRAIT,
52
-               );
52
+                );
53 53
 
54 54
     }//end register()
55 55
 
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
             if ($braceLine > ($classLine + 1)) {
100 100
                 $error = 'Opening brace of a %s must be on the line following the %s declaration; found %s line(s)';
101 101
                 $data  = array(
102
-                          $tokens[$stackPtr]['content'],
103
-                          $tokens[$stackPtr]['content'],
104
-                          ($braceLine - $classLine - 1),
105
-                         );
102
+                            $tokens[$stackPtr]['content'],
103
+                            $tokens[$stackPtr]['content'],
104
+                            ($braceLine - $classLine - 1),
105
+                            );
106 106
                 $fix   = $phpcsFile->addFixableError($error, $curlyBrace, 'OpenBraceWrongLine', $data);
107 107
                 if ($fix === true) {
108 108
                     $phpcsFile->fixer->beginChangeset();
@@ -142,9 +142,9 @@  discard block
 block discarded – undo
142 142
             if ($spaces !== $expected) {
143 143
                 $error = 'Expected %s spaces before opening brace; %s found';
144 144
                 $data  = array(
145
-                          $expected,
146
-                          $spaces,
147
-                         );
145
+                            $expected,
146
+                            $spaces,
147
+                            );
148 148
 
149 149
                 $fix = $phpcsFile->addFixableError($error, $curlyBrace, 'SpaceBeforeBrace', $data);
150 150
                 if ($fix === true) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
                           $tokens[$stackPtr]['content'],
104 104
                           ($braceLine - $classLine - 1),
105 105
                          );
106
-                $fix   = $phpcsFile->addFixableError($error, $curlyBrace, 'OpenBraceWrongLine', $data);
106
+                $fix = $phpcsFile->addFixableError($error, $curlyBrace, 'OpenBraceWrongLine', $data);
107 107
                 if ($fix === true) {
108 108
                     $phpcsFile->fixer->beginChangeset();
109 109
                     for ($i = ($curlyBrace - 1); $i > $lastContent; $i--) {
Please login to merge, or discard this patch.
Standards/PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@  discard block
 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
      * The number of spaces code should be indented.
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         return array(
57 57
                 T_IF,
58 58
                 T_ELSEIF,
59
-               );
59
+                );
60 60
 
61 61
     }//end register()
62 62
 
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
                 if ($expectedIndent !== $foundIndent) {
167 167
                     $error = 'Multi-line IF statement not indented correctly; expected %s spaces but found %s';
168 168
                     $data  = array(
169
-                              $expectedIndent,
170
-                              $foundIndent,
171
-                             );
169
+                                $expectedIndent,
170
+                                $foundIndent,
171
+                                );
172 172
 
173 173
                     $fix = $phpcsFile->addFixableError($error, $i, 'Alignment', $data);
174 174
                     if ($fix === true) {
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     /**
42 42
      * Returns an array of tokens this test wants to listen for.
43 43
      *
44
-     * @return array
44
+     * @return integer[]
45 45
      */
46 46
     public function register()
47 47
     {
Please login to merge, or discard this patch.
CodeSniffer/Standards/PEAR/Sniffs/Formatting/MultiLineAssignmentSniff.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -107,9 +107,9 @@
 block discarded – undo
107 107
         if ($foundIndent !== $expectedIndent) {
108 108
             $error = 'Multi-line assignment not indented correctly; expected %s spaces but found %s';
109 109
             $data  = array(
110
-                      $expectedIndent,
111
-                      $foundIndent,
112
-                     );
110
+                        $expectedIndent,
111
+                        $foundIndent,
112
+                        );
113 113
             $phpcsFile->addError($error, $stackPtr, 'Indent', $data);
114 114
         }
115 115
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      *
38 38
      * @param string $testFile The name of the file being tested.
39 39
      *
40
-     * @return array
40
+     * @return string[]
41 41
      */
42 42
     public function getCliValues($testFile)
43 43
     {
Please login to merge, or discard this patch.
Standards/PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,9 +74,9 @@
 block discarded – undo
74 74
         if ($isPublic === true && $scopeSpecified === true && $memberName{0} === '_') {
75 75
             $error = '%s member variable "%s" must not be prefixed with an underscore';
76 76
             $data  = array(
77
-                      ucfirst($scope),
78
-                      $memberName,
79
-                     );
77
+                        ucfirst($scope),
78
+                        $memberName,
79
+                        );
80 80
             $phpcsFile->addError($error, $stackPtr, 'PublicUnderscore', $data);
81 81
             return;
82 82
         }
Please login to merge, or discard this patch.
Standards/PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -41,22 +41,22 @@  discard block
 block discarded – undo
41 41
      * @var array
42 42
      */
43 43
     protected $magicMethods = array(
44
-                               'construct'  => true,
45
-                               'destruct'   => true,
46
-                               'call'       => true,
47
-                               'callstatic' => true,
48
-                               'get'        => true,
49
-                               'set'        => true,
50
-                               'isset'      => true,
51
-                               'unset'      => true,
52
-                               'sleep'      => true,
53
-                               'wakeup'     => true,
54
-                               'tostring'   => true,
55
-                               'set_state'  => true,
56
-                               'clone'      => true,
57
-                               'invoke'     => true,
58
-                               'debuginfo'  => true,
59
-                              );
44
+                                'construct'  => true,
45
+                                'destruct'   => true,
46
+                                'call'       => true,
47
+                                'callstatic' => true,
48
+                                'get'        => true,
49
+                                'set'        => true,
50
+                                'isset'      => true,
51
+                                'unset'      => true,
52
+                                'sleep'      => true,
53
+                                'wakeup'     => true,
54
+                                'tostring'   => true,
55
+                                'set_state'  => true,
56
+                                'clone'      => true,
57
+                                'invoke'     => true,
58
+                                'debuginfo'  => true,
59
+                                );
60 60
 
61 61
     /**
62 62
      * A list of all PHP magic functions.
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
         if (preg_match('|^__|', $methodName) !== 0) {
102 102
             $magicPart = strtolower(substr($methodName, 2));
103 103
             if (isset($this->magicMethods[$magicPart]) === false) {
104
-                 $error = 'Method name "%s" is invalid; only PHP magic methods should be prefixed with a double underscore';
105
-                 $phpcsFile->addError($error, $stackPtr, 'MethodDoubleUnderscore', $errorData);
104
+                    $error = 'Method name "%s" is invalid; only PHP magic methods should be prefixed with a double underscore';
105
+                    $phpcsFile->addError($error, $stackPtr, 'MethodDoubleUnderscore', $errorData);
106 106
             }
107 107
 
108 108
             return;
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
         if ($isPublic === true && $scopeSpecified === true && $methodName{0} === '_') {
145 145
             $error = '%s method name "%s" must not be prefixed with an underscore';
146 146
             $data  = array(
147
-                      ucfirst($scope),
148
-                      $errorData[0],
149
-                     );
147
+                        ucfirst($scope),
148
+                        $errorData[0],
149
+                        );
150 150
             $phpcsFile->addError($error, $stackPtr, 'PublicUnderscore', $data);
151 151
             return;
152 152
         }
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
             if ($scopeSpecified === true) {
166 166
                 $error = '%s method name "%s" is not in camel caps format';
167 167
                 $data  = array(
168
-                          ucfirst($scope),
169
-                          $errorData[0],
170
-                         );
168
+                            ucfirst($scope),
169
+                            $errorData[0],
170
+                            );
171 171
                 $phpcsFile->addError($error, $stackPtr, 'ScopeNotCamelCaps', $data);
172 172
             } else {
173 173
                 $error = 'Method name "%s" is not in camel caps format';
@@ -208,8 +208,8 @@  discard block
 block discarded – undo
208 208
         if (preg_match('|^__|', $functionName) !== 0) {
209 209
             $magicPart = strtolower(substr($functionName, 2));
210 210
             if (isset($this->magicFunctions[$magicPart]) === false) {
211
-                 $error = 'Function name "%s" is invalid; only PHP magic methods should be prefixed with a double underscore';
212
-                 $phpcsFile->addError($error, $stackPtr, 'FunctionDoubleUnderscore', $errorData);
211
+                    $error = 'Function name "%s" is invalid; only PHP magic methods should be prefixed with a double underscore';
212
+                    $phpcsFile->addError($error, $stackPtr, 'FunctionDoubleUnderscore', $errorData);
213 213
             }
214 214
 
215 215
             return;
Please login to merge, or discard this patch.