Completed
Pull Request — master (#12)
by Bill
01:39
created
foobar/foobar.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
2 2
 
3 3
 function foobar($one, $two, $three)
4 4
 {
5
-	return 'Foobar';
5
+    return 'Foobar';
6 6
 }
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
src/Codor/Sniffs/Files/FunctionParameterSniff.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function register()
22 22
     {
23
-        return [T_FUNCTION];
23
+        return [ T_FUNCTION ];
24 24
     }
25 25
 
26 26
     /**
@@ -34,19 +34,19 @@  discard block
 block discarded – undo
34 34
     public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
35 35
     {
36 36
         $tokens = $phpcsFile->getTokens();
37
-        $token = $tokens[$stackPtr];
37
+        $token = $tokens[ $stackPtr ];
38 38
 
39 39
         // Skip function without body.
40
-        if (isset($token['scope_opener']) === false) {
40
+        if (isset($token[ 'scope_opener' ]) === false) {
41 41
             return;
42 42
         }
43 43
 
44
-        $openParenthesisIndex = $token['parenthesis_opener'];
45
-        $closedParenthesisIndex = $token['parenthesis_closer'];
44
+        $openParenthesisIndex = $token[ 'parenthesis_opener' ];
45
+        $closedParenthesisIndex = $token[ 'parenthesis_closer' ];
46 46
 
47 47
         $numberOfParameters = 0;
48
-        for ($index=$openParenthesisIndex+1; $index <= $closedParenthesisIndex; $index++) {
49
-            if ($tokens[$index]['type'] == 'T_VARIABLE') {
48
+        for ($index = $openParenthesisIndex + 1; $index <= $closedParenthesisIndex; $index++) {
49
+            if ($tokens[ $index ][ 'type' ] == 'T_VARIABLE') {
50 50
                 $numberOfParameters++;
51 51
             }
52 52
         }
Please login to merge, or discard this patch.