Completed
Pull Request — master (#18)
by Bill
02:31 queued 48s
created
src/Codor/Sniffs/Files/ReturnNullSniff.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
      */
15 15
     public function register()
16 16
     {
17
-        return [T_RETURN];
17
+        return [ T_RETURN ];
18 18
     }
19 19
 
20 20
     /**
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
 
33 33
         $returnValueToken = '';
34 34
         for ($index = $returnTokenIndex; $index < count($tokens); $index++) { 
35
-            if ($tokens[$index]['type'] === 'T_SEMICOLON') {
36
-                $returnValueToken = $tokens[$index - 1];
35
+            if ($tokens[ $index ][ 'type' ] === 'T_SEMICOLON') {
36
+                $returnValueToken = $tokens[ $index - 1 ];
37 37
                 break;
38 38
             }
39 39
         }
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             return;
43 43
         }
44 44
 
45
-        if ($returnValueToken['type'] === 'T_NULL') {
45
+        if ($returnValueToken[ 'type' ] === 'T_NULL') {
46 46
             $error = "Return null value found.";
47 47
             $phpcsFile->addError($error, $stackPtr);
48 48
         }
Please login to merge, or discard this patch.