Completed
Push — master ( 540cab...2d0943 )
by Bill
02:23 queued 01:04
created
src/Codor/Sniffs/Classes/FinalPrivateSniff.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function register(): array
15 15
     {
16
-        return [T_CLASS];
16
+        return [ T_CLASS ];
17 17
     }
18 18
 
19 19
     /**
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
      * List of protected methods found.
27 27
      * @var array
28 28
      */
29
-    protected $protectedMethods = [];
29
+    protected $protectedMethods = [ ];
30 30
 
31 31
     /**
32 32
      * List of protected variables found.
33 33
      * @var array
34 34
      */
35
-    protected $protectedVariables = [];
35
+    protected $protectedVariables = [ ];
36 36
 
37 37
     /**
38 38
      * Processes the tokens that this sniff is interested in.
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
      */
63 63
     protected function handleToken($tokens, $index)
64 64
     {
65
-        $tokenType = $tokens[$index]['type'];
65
+        $tokenType = $tokens[ $index ][ 'type' ];
66 66
 
67 67
         if ($tokenType === 'T_FINAL') {
68 68
             $this->classIsMarkedFinal = true;
69 69
             return;
70 70
         }
71 71
 
72
-        if (! $this->classIsMarkedFinal) {
72
+        if (!$this->classIsMarkedFinal) {
73 73
             return;
74 74
         }
75 75
 
@@ -89,16 +89,16 @@  discard block
 block discarded – undo
89 89
      */
90 90
     protected function handleFoundProtectedElement($tokens, $index)
91 91
     {
92
-        $type = $tokens[$index+2]['type'];
92
+        $type = $tokens[ $index + 2 ][ 'type' ];
93 93
 
94 94
         if ($type === 'T_VARIABLE') {
95
-            $variableName = $tokens[$index+2]['content'];
96
-            $this->protectedVariables[] = $variableName;
95
+            $variableName = $tokens[ $index + 2 ][ 'content' ];
96
+            $this->protectedVariables[ ] = $variableName;
97 97
             return;
98 98
         }
99 99
 
100
-        $methodName = $tokens[$index+4]['content'];
101
-        $this->protectedMethods[] = $methodName;
100
+        $methodName = $tokens[ $index + 4 ][ 'content' ];
101
+        $this->protectedMethods[ ] = $methodName;
102 102
     }
103 103
 
104 104
     /**
Please login to merge, or discard this patch.