Completed
Branch master (d87ed9)
by Tomáš
07:16
created
CodeSniffer/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         return array(
42 42
                 T_COMMENT,
43 43
                 T_DOC_COMMENT_OPEN_TAG,
44
-               );
44
+                );
45 45
 
46 46
     }//end register()
47 47
 
@@ -69,19 +69,19 @@  discard block
 block discarded – undo
69 69
         if ($tokens[$stackPtr]['code'] === T_DOC_COMMENT_OPEN_TAG) {
70 70
             $nextToken = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true);
71 71
             $ignore    = array(
72
-                          T_CLASS     => true,
73
-                          T_INTERFACE => true,
74
-                          T_TRAIT     => true,
75
-                          T_FUNCTION  => true,
76
-                          T_PUBLIC    => true,
77
-                          T_PRIVATE   => true,
78
-                          T_FINAL     => true,
79
-                          T_PROTECTED => true,
80
-                          T_STATIC    => true,
81
-                          T_ABSTRACT  => true,
82
-                          T_CONST     => true,
83
-                          T_VAR       => true,
84
-                         );
72
+                            T_CLASS     => true,
73
+                            T_INTERFACE => true,
74
+                            T_TRAIT     => true,
75
+                            T_FUNCTION  => true,
76
+                            T_PUBLIC    => true,
77
+                            T_PRIVATE   => true,
78
+                            T_FINAL     => true,
79
+                            T_PROTECTED => true,
80
+                            T_STATIC    => true,
81
+                            T_ABSTRACT  => true,
82
+                            T_CONST     => true,
83
+                            T_VAR       => true,
84
+                            );
85 85
             if (isset($ignore[$tokens[$nextToken]['code']]) === true) {
86 86
                 return;
87 87
             }
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
                 }
203 203
 
204 204
                 $data = array(
205
-                         $expected,
206
-                         $leadingSpace,
205
+                            $expected,
206
+                            $leadingSpace,
207 207
                         );
208 208
 
209 209
                 $error = 'First line of comment not aligned correctly; expected %s but found %s';
@@ -245,8 +245,8 @@  discard block
 block discarded – undo
245 245
                 }
246 246
 
247 247
                 $data = array(
248
-                         $expected,
249
-                         $leadingSpace,
248
+                            $expected,
249
+                            $leadingSpace,
250 250
                         );
251 251
 
252 252
                 $error = 'Comment line indented incorrectly; expected at least %s but found %s';
@@ -277,8 +277,8 @@  discard block
 block discarded – undo
277 277
                 }
278 278
 
279 279
                 $data = array(
280
-                         $expected,
281
-                         $leadingSpace,
280
+                            $expected,
281
+                            $leadingSpace,
282 282
                         );
283 283
 
284 284
                 $error = 'Last line of comment aligned incorrectly; expected %s but found %s';
Please login to merge, or discard this patch.
Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
                 T_MINUS_EQUAL,
46 46
                 T_INC,
47 47
                 T_DEC,
48
-               );
48
+                );
49 49
 
50 50
     }//end register()
51 51
 
Please login to merge, or discard this patch.
Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
      * @var array
56 56
      */
57 57
     public $supportedTokenizers = array(
58
-                                   'PHP',
59
-                                   'JS',
60
-                                  );
58
+                                    'PHP',
59
+                                    'JS',
60
+                                    );
61 61
 
62 62
     /**
63 63
      * A list of valid comparison operators.
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
      * @var array
66 66
      */
67 67
     private static $_validOps = array(
68
-                                 T_IS_IDENTICAL,
69
-                                 T_IS_NOT_IDENTICAL,
70
-                                 T_LESS_THAN,
71
-                                 T_GREATER_THAN,
72
-                                 T_IS_GREATER_OR_EQUAL,
73
-                                 T_IS_SMALLER_OR_EQUAL,
74
-                                 T_INSTANCEOF,
68
+                                    T_IS_IDENTICAL,
69
+                                    T_IS_NOT_IDENTICAL,
70
+                                    T_LESS_THAN,
71
+                                    T_GREATER_THAN,
72
+                                    T_IS_GREATER_OR_EQUAL,
73
+                                    T_IS_SMALLER_OR_EQUAL,
74
+                                    T_INSTANCEOF,
75 75
                                 );
76 76
 
77 77
     /**
@@ -80,16 +80,16 @@  discard block
 block discarded – undo
80 80
      * @var array(int => string)
81 81
      */
82 82
     private static $_invalidOps = array(
83
-                                   'PHP' => array(
84
-                                             T_IS_EQUAL     => '===',
85
-                                             T_IS_NOT_EQUAL => '!==',
86
-                                             T_BOOLEAN_NOT  => '=== FALSE',
83
+                                    'PHP' => array(
84
+                                                T_IS_EQUAL     => '===',
85
+                                                T_IS_NOT_EQUAL => '!==',
86
+                                                T_BOOLEAN_NOT  => '=== FALSE',
87 87
                                             ),
88
-                                   'JS'  => array(
89
-                                             T_IS_EQUAL     => '===',
90
-                                             T_IS_NOT_EQUAL => '!==',
88
+                                    'JS'  => array(
89
+                                                T_IS_EQUAL     => '===',
90
+                                                T_IS_NOT_EQUAL => '!==',
91 91
                                             ),
92
-                                  );
92
+                                    );
93 93
 
94 94
 
95 95
     /**
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                 T_INLINE_THEN,
106 106
                 T_WHILE,
107 107
                 T_FOR,
108
-               );
108
+                );
109 109
 
110 110
     }//end register()
111 111
 
@@ -191,9 +191,9 @@  discard block
 block discarded – undo
191 191
             if (in_array($type, array_keys(self::$_invalidOps[$tokenizer])) === true) {
192 192
                 $error = 'Operator %s prohibited; use %s instead';
193 193
                 $data  = array(
194
-                          $tokens[$i]['content'],
195
-                          self::$_invalidOps[$tokenizer][$type],
196
-                         );
194
+                            $tokens[$i]['content'],
195
+                            self::$_invalidOps[$tokenizer][$type],
196
+                            );
197 197
                 $phpcsFile->addError($error, $i, 'NotAllowed', $data);
198 198
                 $foundOps++;
199 199
             } else if (in_array($type, self::$_validOps) === true) {
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.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
         return array(
43 43
                 T_LOGICAL_AND,
44 44
                 T_LOGICAL_OR,
45
-               );
45
+                );
46 46
 
47 47
     }//end register()
48 48
 
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
         $tokens = $phpcsFile->getTokens();
62 62
 
63 63
         $replacements = array(
64
-                         'and' => '&&',
65
-                         'or'  => '||',
64
+                            'and' => '&&',
65
+                            'or'  => '||',
66 66
                         );
67 67
 
68 68
         $operator = strtolower($tokens[$stackPtr]['content']);
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
 
73 73
         $error = 'Logical operator "%s" is prohibited; use "%s" instead';
74 74
         $data  = array(
75
-                  $operator,
76
-                  $replacements[$operator],
77
-                 );
75
+                    $operator,
76
+                    $replacements[$operator],
77
+                    );
78 78
         $phpcsFile->addError($error, $stackPtr, 'NotAllowed', $data);
79 79
 
80 80
     }//end process()
Please login to merge, or discard this patch.
Standards/Squiz/Sniffs/PHP/DisallowComparisonAssignmentSniff.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,10 +80,10 @@
 block discarded – undo
80 80
 
81 81
         // Ignore function calls.
82 82
         $ignore = array(
83
-                   T_STRING,
84
-                   T_WHITESPACE,
85
-                   T_OBJECT_OPERATOR,
86
-                  );
83
+                    T_STRING,
84
+                    T_WHITESPACE,
85
+                    T_OBJECT_OPERATOR,
86
+                    );
87 87
 
88 88
         $next = $phpcsFile->findNext($ignore, ($stackPtr + 1), null, true);
89 89
         if ($tokens[$next]['code'] === T_OPEN_PARENTHESIS
Please login to merge, or discard this patch.
Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php 1 patch
Indentation   +10 added lines, -10 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
      * An array of functions we don't want in the condition of loops.
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
      * @return array
45 45
      */
46 46
     protected $forbiddenFunctions = array(
47
-                                     'PHP' => array(
48
-                                               'sizeof' => true,
49
-                                               'strlen' => true,
50
-                                               'count'  => true,
51
-                                              ),
52
-                                     'JS'  => array('length' => true),
47
+                                        'PHP' => array(
48
+                                                'sizeof' => true,
49
+                                                'strlen' => true,
50
+                                                'count'  => true,
51
+                                                ),
52
+                                        'JS'  => array('length' => true),
53 53
                                     );
54 54
 
55 55
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         return array(
64 64
                 T_WHILE,
65 65
                 T_FOR,
66
-               );
66
+                );
67 67
 
68 68
     }//end register()
69 69
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowInlineIfSniff.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@
 block discarded – undo
36 36
      * @var array
37 37
      */
38 38
     public $supportedTokenizers = array(
39
-                                   'PHP',
40
-                                   'JS',
41
-                                  );
39
+                                    'PHP',
40
+                                    'JS',
41
+                                    );
42 42
 
43 43
 
44 44
     /**
Please login to merge, or discard this patch.
CodeSniffer/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.
CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
                 T_RETURN,
46 46
                 T_THROW,
47 47
                 T_EXIT,
48
-               );
48
+                );
49 49
 
50 50
     }//end register()
51 51
 
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
                 $end  = $phpcsFile->findEndOfStatement($stackPtr);
117 117
                 $next = $phpcsFile->findNext(
118 118
                     array(
119
-                     T_CASE,
120
-                     T_DEFAULT,
121
-                     T_CLOSE_CURLY_BRACKET,
119
+                        T_CASE,
120
+                        T_DEFAULT,
121
+                        T_CLOSE_CURLY_BRACKET,
122 122
                     ),
123 123
                     ($end + 1)
124 124
                 );
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
         if (isset($tokens[$prev]['parenthesis_owner']) === true) {
154 154
             $owner  = $tokens[$prev]['parenthesis_owner'];
155 155
             $ignore = array(
156
-                       T_IF     => true,
157
-                       T_ELSE   => true,
158
-                       T_ELSEIF => true,
159
-                      );
156
+                        T_IF     => true,
157
+                        T_ELSE   => true,
158
+                        T_ELSEIF => true,
159
+                        );
160 160
             if (isset($ignore[$tokens[$owner]['code']]) === true) {
161 161
                 return;
162 162
             }
Please login to merge, or discard this patch.