Completed
Branch master (d87ed9)
by Tomáš
07:16
created
CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@
 block discarded – undo
187 187
      * @param array                $tokens      The stack of tokens that make up
188 188
      *                                          the file.
189 189
      *
190
-     * @return void
190
+     * @return boolean
191 191
      */
192 192
     public function isMultiLineDeclaration(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $openBracket, $tokens)
193 193
     {
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         return array(
47 47
                 T_FUNCTION,
48 48
                 T_CLOSURE,
49
-               );
49
+                );
50 50
 
51 51
     }//end register()
52 52
 
@@ -353,9 +353,9 @@  discard block
 block discarded – undo
353 353
                 if ($expectedIndent !== $foundIndent) {
354 354
                     $error = 'Multi-line function declaration not indented correctly; expected %s spaces but found %s';
355 355
                     $data  = array(
356
-                              $expectedIndent,
357
-                              $foundIndent,
358
-                             );
356
+                                $expectedIndent,
357
+                                $foundIndent,
358
+                                );
359 359
 
360 360
                     $fix = $phpcsFile->addFixableError($error, $i, 'Indent', $data);
361 361
                     if ($fix === true) {
Please login to merge, or discard this patch.
CodeSniffer/Standards/PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     /**
36 36
      * Returns an array of tokens this test wants to listen for.
37 37
      *
38
-     * @return array
38
+     * @return integer[]
39 39
      */
40 40
     public function register()
41 41
     {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         return array(
43 43
                 T_CLASS,
44 44
                 T_INTERFACE,
45
-               );
45
+                );
46 46
 
47 47
     }//end register()
48 48
 
Please login to merge, or discard this patch.
Standards/PSR2/Sniffs/ControlStructures/SwitchDeclarationSniff.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     /**
40 40
      * Returns an array of tokens this test wants to listen for.
41 41
      *
42
-     * @return array
42
+     * @return integer[]
43 43
      */
44 44
     public function register()
45 45
     {
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,8 +87,8 @@
 block discarded – undo
87 87
                 $expected = strtolower($tokens[$nextCase]['content']);
88 88
                 $error    = strtoupper($type).' keyword must be lowercase; expected "%s" but found "%s"';
89 89
                 $data     = array(
90
-                             $expected,
91
-                             $tokens[$nextCase]['content'],
90
+                                $expected,
91
+                                $tokens[$nextCase]['content'],
92 92
                             );
93 93
 
94 94
                 $fix = $phpcsFile->addFixableError($error, $nextCase, $type.'NotLower', $data);
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Sniffs/Files/ClosingTagSniff.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 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
     {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * @param int                  $stackPtr  The position of the current token in
49 49
      *                                        the stack passed in $tokens.
50 50
      *
51
-     * @return void
51
+     * @return integer
52 52
      */
53 53
     public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
54 54
     {
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 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
     {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * @param int                  $stackPtr  The position of the current token in
49 49
      *                                        the stack passed in $tokens.
50 50
      *
51
-     * @return void
51
+     * @return integer
52 52
      */
53 53
     public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
54 54
     {
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 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
     {
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      * @param int                  $stackPtr  The position of the current token in
146 146
      *                                        the stack passed in $tokens.
147 147
      *
148
-     * @return void
148
+     * @return boolean
149 149
      */
150 150
     private function _shouldIgnoreUse(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
151 151
     {
Please login to merge, or discard this patch.
Standards/PSR2/Tests/ControlStructures/SwitchDeclarationUnitTest.inc 3 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -89,8 +89,6 @@
 block discarded – undo
89 89
         }
90 90
 }
91 91
 
92
-use Vendor\Test\FooBar;
93
-
94 92
 function test()
95 93
 {
96 94
     switch ($val) {
Please login to merge, or discard this patch.
Switch Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
 }
35 35
 
36 36
 switch ($foo) {
37
-    case'Foo': {
38
-        echo 'foo';
39
-        break;
40
-        }
37
+        case'Foo': {
38
+            echo 'foo';
39
+            break;
40
+            }
41 41
 }
42 42
 
43 43
 while ($i < 10) {
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 }
53 53
 
54 54
 switch (true) {
55
-    case is_resource($value):
56
-        throw new Exception('foo');
57
-    case is_object($value):
58
-        return 'object';
55
+        case is_resource($value):
56
+            throw new Exception('foo');
57
+        case is_object($value):
58
+            return 'object';
59 59
 }
60 60
 
61 61
 switch (0) {
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 }
106 106
 
107 107
 switch ($foo) {
108
-    case 1: $bar = 1; break;
109
-    case 2:
108
+        case 1: $bar = 1; break;
109
+        case 2:
110 110
     
111
-        $bar = 2; break;
112
-    case 21:
113
-    case 3: return 3;
114
-    default: $bar = 0;
111
+            $bar = 2; break;
112
+        case 21:
113
+        case 3: return 3;
114
+        default: $bar = 0;
115 115
 }
116 116
 
117 117
 switch ($foo) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
         break;
136 136
 }
137 137
 
138
-switch($foo)
138
+switch ($foo)
139 139
 {
140 140
     case ('foo'):
141 141
     default:
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.1.inc 2 patches
Unused Use Statements   -8 removed lines patch added patch discarded remove patch
@@ -1,15 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace MyProject;
3 3
 
4
-use BarClass as Bar;
5
-use My\Full\Classname as Another;
6
-
7
-
8
-use Something;
9
-use SomethingElse;
10
-
11 4
 // Comment here.
12
-use LastThing;
13 5
 
14 6
 class Foo {
15 7
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 }
16 16
 
17 17
 $var = new MyClass(
18
-    function () use ($foo, $bar) {
18
+    function() use ($foo, $bar) {
19 19
         return true;
20 20
     }
21 21
 );
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Tests/Namespaces/UseDeclarationUnitTest.2.inc 1 patch
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -1,14 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace MyProject;
3 3
 
4
-use  BarClass as Bar;
5
-use My\Full\Classname as Another, My\Full\NSname;
6
-
7 4
 
8 5
 namespace AnotherProject;
9 6
 
10
-use ArrayObject;
11
-
12 7
 
13 8
 $foo = 'bar';
14 9
 
Please login to merge, or discard this patch.