Completed
Branch master (d87ed9)
by Tomáš
07:16
created
Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     /**
33 33
      * Returns an array of tokens this test wants to listen for.
34 34
      *
35
-     * @return array
35
+     * @return string[]
36 36
      */
37 37
     public function register()
38 38
     {
Please login to merge, or discard this patch.
Standards/Generic/Sniffs/Functions/CallTimePassByReferenceSniff.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     /**
33 33
      * Returns an array of tokens this test wants to listen for.
34 34
      *
35
-     * @return array
35
+     * @return integer[]
36 36
      */
37 37
     public function register()
38 38
     {
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         return array(
40 40
                 T_STRING,
41 41
                 T_VARIABLE,
42
-               );
42
+                );
43 43
 
44 44
     }//end register()
45 45
 
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
 
96 96
         $nextSeparator = $openBracket;
97 97
         $find          = array(
98
-                          T_VARIABLE,
99
-                          T_OPEN_SHORT_ARRAY,
100
-                         );
98
+                            T_VARIABLE,
99
+                            T_OPEN_SHORT_ARRAY,
100
+                            );
101 101
 
102 102
         while (($nextSeparator = $phpcsFile->findNext($find, ($nextSeparator + 1), $closeBracket)) !== false) {
103 103
             if (isset($tokens[$nextSeparator]['nested_parenthesis']) === false) {
Please login to merge, or discard this patch.
CodeSniffer/Standards/Generic/Sniffs/Metrics/CyclomaticComplexitySniff.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
     /**
51 51
      * Returns an array of tokens this test wants to listen for.
52 52
      *
53
-     * @return array
53
+     * @return integer[]
54 54
      */
55 55
     public function register()
56 56
     {
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -85,15 +85,15 @@  discard block
 block discarded – undo
85 85
 
86 86
         // Predicate nodes for PHP.
87 87
         $find = array(
88
-                 T_CASE    => true,
89
-                 T_DEFAULT => true,
90
-                 T_CATCH   => true,
91
-                 T_IF      => true,
92
-                 T_FOR     => true,
93
-                 T_FOREACH => true,
94
-                 T_WHILE   => true,
95
-                 T_DO      => true,
96
-                 T_ELSEIF  => true,
88
+                    T_CASE    => true,
89
+                    T_DEFAULT => true,
90
+                    T_CATCH   => true,
91
+                    T_IF      => true,
92
+                    T_FOR     => true,
93
+                    T_FOREACH => true,
94
+                    T_WHILE   => true,
95
+                    T_DO      => true,
96
+                    T_ELSEIF  => true,
97 97
                 );
98 98
 
99 99
         $complexity = 1;
@@ -108,16 +108,16 @@  discard block
 block discarded – undo
108 108
         if ($complexity > $this->absoluteComplexity) {
109 109
             $error = 'Function\'s cyclomatic complexity (%s) exceeds allowed maximum of %s';
110 110
             $data  = array(
111
-                      $complexity,
112
-                      $this->absoluteComplexity,
113
-                     );
111
+                        $complexity,
112
+                        $this->absoluteComplexity,
113
+                        );
114 114
             $phpcsFile->addError($error, $stackPtr, 'MaxExceeded', $data);
115 115
         } else if ($complexity > $this->complexity) {
116 116
             $warning = 'Function\'s cyclomatic complexity (%s) exceeds %s; consider refactoring the function';
117 117
             $data    = array(
118 118
                         $complexity,
119 119
                         $this->complexity,
120
-                       );
120
+                        );
121 121
             $phpcsFile->addWarning($warning, $stackPtr, 'TooHigh', $data);
122 122
         }
123 123
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/Generic/Sniffs/PHP/NoSilencedErrorsSniff.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     /**
45 45
      * Returns an array of tokens this test wants to listen for.
46 46
      *
47
-     * @return array
47
+     * @return string[]
48 48
      */
49 49
     public function register()
50 50
     {
Please login to merge, or discard this patch.
Standards/Generic/Sniffs/VersionControl/SubversionPropertiesSniff.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     /**
47 47
      * Returns an array of tokens this test wants to listen for.
48 48
      *
49
-     * @return array
49
+     * @return integer[]
50 50
      */
51 51
     public function register()
52 52
     {
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
      * @var array
39 39
      */
40 40
     protected $properties = array(
41
-                             'svn:keywords'  => 'Author Id Revision',
42
-                             'svn:eol-style' => 'native',
41
+                                'svn:keywords'  => 'Author Id Revision',
42
+                                'svn:eol-style' => 'native',
43 43
                             );
44 44
 
45 45
 
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
             ) {
90 90
                 $error = 'Unexpected Subversion property "%s" = "%s"';
91 91
                 $data  = array(
92
-                          $key,
93
-                          $properties[$key],
94
-                         );
92
+                            $key,
93
+                            $properties[$key],
94
+                            );
95 95
                 $phpcsFile->addError($error, $stackPtr, 'Unexpected', $data);
96 96
                 continue;
97 97
             }
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
             ) {
102 102
                 $error = 'Missing Subversion property "%s" = "%s"';
103 103
                 $data  = array(
104
-                          $key,
105
-                          $this->properties[$key],
106
-                         );
104
+                            $key,
105
+                            $this->properties[$key],
106
+                            );
107 107
                 $phpcsFile->addError($error, $stackPtr, 'Missing', $data);
108 108
                 continue;
109 109
             }
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
             ) {
114 114
                 $error = 'Subversion property "%s" = "%s" does not match "%s"';
115 115
                 $data  = array(
116
-                          $key,
117
-                          $properties[$key],
118
-                          $this->properties[$key],
119
-                         );
116
+                            $key,
117
+                            $properties[$key],
118
+                            $this->properties[$key],
119
+                            );
120 120
                 $phpcsFile->addError($error, $stackPtr, 'NoMatch', $data);
121 121
             }
122 122
         }//end foreach
Please login to merge, or discard this patch.
Standards/Generic/Sniffs/WhiteSpace/DisallowSpaceIndentSniff.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     /**
51 51
      * Returns an array of tokens this test wants to listen for.
52 52
      *
53
-     * @return array
53
+     * @return integer[]
54 54
      */
55 55
     public function register()
56 56
     {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      * @param int                  $stackPtr  The position of the current token in
67 67
      *                                        the stack passed in $tokens.
68 68
      *
69
-     * @return void
69
+     * @return integer
70 70
      */
71 71
     public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
72 72
     {
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
      * @var array
35 35
      */
36 36
     public $supportedTokenizers = array(
37
-                                   'PHP',
38
-                                   'JS',
39
-                                   'CSS',
40
-                                  );
37
+                                    'PHP',
38
+                                    'JS',
39
+                                    'CSS',
40
+                                    );
41 41
 
42 42
     /**
43 43
      * The --tab-width CLI value that is being used.
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                         T_WHITESPACE             => true,
87 87
                         T_INLINE_HTML            => true,
88 88
                         T_DOC_COMMENT_WHITESPACE => true,
89
-                       );
89
+                        );
90 90
 
91 91
         $tokens = $phpcsFile->getTokens();
92 92
         for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) {
Please login to merge, or discard this patch.
CodeSniffer/Standards/Generic/Sniffs/WhiteSpace/ScopeIndentSniff.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     /**
118 118
      * Returns an array of tokens this test wants to listen for.
119 119
      *
120
-     * @return array
120
+     * @return integer[]
121 121
      */
122 122
     public function register()
123 123
     {
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      * @param int                  $stackPtr  The position of the current token
138 138
      *                                        in the stack passed in $tokens.
139 139
      *
140
-     * @return void
140
+     * @return integer
141 141
      */
142 142
     public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
143 143
     {
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
      * @var array
39 39
      */
40 40
     public $supportedTokenizers = array(
41
-                                   'PHP',
42
-                                   'JS',
43
-                                  );
41
+                                    'PHP',
42
+                                    'JS',
43
+                                    );
44 44
 
45 45
     /**
46 46
      * The number of spaces code should be indented.
@@ -810,15 +810,15 @@  discard block
 block discarded – undo
810 810
                 if ($this->tabIndent === true) {
811 811
                     $error .= '%s tabs, found %s';
812 812
                     $data   = array(
813
-                               floor($checkIndent / $this->_tabWidth),
814
-                               floor($tokenIndent / $this->_tabWidth),
815
-                              );
813
+                                floor($checkIndent / $this->_tabWidth),
814
+                                floor($tokenIndent / $this->_tabWidth),
815
+                                );
816 816
                 } else {
817 817
                     $error .= '%s spaces, found %s';
818 818
                     $data   = array(
819
-                               $checkIndent,
820
-                               $tokenIndent,
821
-                              );
819
+                                $checkIndent,
820
+                                $tokenIndent,
821
+                                );
822 822
                 }
823 823
 
824 824
                 if ($this->_debug === true) {
Please login to merge, or discard this patch.
CodeSniffer/Standards/Generic/Tests/PHP/SyntaxUnitTest.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     /**
35 35
      * Should this test be skipped for some reason.
36 36
      *
37
-     * @return void
37
+     * @return boolean
38 38
      */
39 39
     protected function shouldSkipTest()
40 40
     {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
     {
61 61
         return array(
62 62
                 3 => 1,
63
-               );
63
+                );
64 64
 
65 65
     }//end getErrorList()
66 66
 
Please login to merge, or discard this patch.
Standards/Generic/Tests/WhiteSpace/DisallowTabIndentUnitTest.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      *
37 37
      * @param string $testFile The name of the file being tested.
38 38
      *
39
-     * @return array
39
+     * @return string[]
40 40
      */
41 41
     public function getCliValues($testFile)
42 42
     {
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,20 +79,20 @@
 block discarded – undo
79 79
                     46 => 1,
80 80
                     47 => 1,
81 81
                     48 => 1,
82
-                   );
82
+                    );
83 83
             break;
84 84
         case 'DisallowTabIndentUnitTest.js':
85 85
             return array(
86 86
                     3 => 1,
87 87
                     5 => 1,
88 88
                     6 => 1,
89
-                   );
89
+                    );
90 90
             break;
91 91
         case 'DisallowTabIndentUnitTest.css':
92 92
             return array(
93 93
                     1 => 1,
94 94
                     2 => 1,
95
-                   );
95
+                    );
96 96
             break;
97 97
         default:
98 98
             return array();
Please login to merge, or discard this patch.
Switch Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -58,45 +58,45 @@
 block discarded – undo
58 58
     public function getErrorList($testFile='DisallowTabIndentUnitTest.inc')
59 59
     {
60 60
         switch ($testFile) {
61
-        case 'DisallowTabIndentUnitTest.inc':
62
-            return array(
63
-                    5  => 2,
64
-                    9  => 1,
65
-                    15 => 1,
66
-                    20 => 2,
67
-                    21 => 1,
68
-                    22 => 2,
69
-                    23 => 1,
70
-                    24 => 2,
71
-                    31 => 1,
72
-                    32 => 2,
73
-                    33 => 2,
74
-                    41 => 1,
75
-                    42 => 1,
76
-                    43 => 1,
77
-                    44 => 1,
78
-                    45 => 1,
79
-                    46 => 1,
80
-                    47 => 1,
81
-                    48 => 1,
82
-                   );
83
-            break;
84
-        case 'DisallowTabIndentUnitTest.js':
85
-            return array(
86
-                    3 => 1,
87
-                    5 => 1,
88
-                    6 => 1,
89
-                   );
90
-            break;
91
-        case 'DisallowTabIndentUnitTest.css':
92
-            return array(
93
-                    1 => 1,
94
-                    2 => 1,
95
-                   );
96
-            break;
97
-        default:
98
-            return array();
99
-            break;
61
+            case 'DisallowTabIndentUnitTest.inc':
62
+                return array(
63
+                        5  => 2,
64
+                        9  => 1,
65
+                        15 => 1,
66
+                        20 => 2,
67
+                        21 => 1,
68
+                        22 => 2,
69
+                        23 => 1,
70
+                        24 => 2,
71
+                        31 => 1,
72
+                        32 => 2,
73
+                        33 => 2,
74
+                        41 => 1,
75
+                        42 => 1,
76
+                        43 => 1,
77
+                        44 => 1,
78
+                        45 => 1,
79
+                        46 => 1,
80
+                        47 => 1,
81
+                        48 => 1,
82
+                       );
83
+                break;
84
+            case 'DisallowTabIndentUnitTest.js':
85
+                return array(
86
+                        3 => 1,
87
+                        5 => 1,
88
+                        6 => 1,
89
+                       );
90
+                break;
91
+            case 'DisallowTabIndentUnitTest.css':
92
+                return array(
93
+                        1 => 1,
94
+                        2 => 1,
95
+                       );
96
+                break;
97
+            default:
98
+                return array();
99
+                break;
100 100
         }//end switch
101 101
 
102 102
     }//end getErrorList()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      *
56 56
      * @return array<int, int>
57 57
      */
58
-    public function getErrorList($testFile='DisallowTabIndentUnitTest.inc')
58
+    public function getErrorList($testFile = 'DisallowTabIndentUnitTest.inc')
59 59
     {
60 60
         switch ($testFile) {
61 61
         case 'DisallowTabIndentUnitTest.inc':
Please login to merge, or discard this patch.