Completed
Pull Request — master (#12)
by Bill
01:43
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
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      */
17 17
     public function register()
18 18
     {
19
-        return [T_FUNCTION];
19
+        return [ T_FUNCTION ];
20 20
     }
21 21
 
22 22
     /**
@@ -30,19 +30,19 @@  discard block
 block discarded – undo
30 30
     public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
31 31
     {
32 32
         $tokens = $phpcsFile->getTokens();
33
-        $token = $tokens[$stackPtr];
33
+        $token = $tokens[ $stackPtr ];
34 34
 
35 35
         // Skip function without body.
36
-        if (isset($token['scope_opener']) === false) {
36
+        if (isset($token[ 'scope_opener' ]) === false) {
37 37
             return;
38 38
         }
39 39
 
40
-        $openParenthesisIndex = $token['parenthesis_opener'];
41
-        $closedParenthesisIndex = $token['parenthesis_closer'];
40
+        $openParenthesisIndex = $token[ 'parenthesis_opener' ];
41
+        $closedParenthesisIndex = $token[ 'parenthesis_closer' ];
42 42
 
43 43
         $numberOfParameters = 0;
44
-        for ($index=$openParenthesisIndex+1; $index <= $closedParenthesisIndex ; $index++) { 
45
-            if ($tokens[$index]['type'] == 'T_VARIABLE') {
44
+        for ($index = $openParenthesisIndex + 1; $index <= $closedParenthesisIndex; $index++) { 
45
+            if ($tokens[ $index ][ 'type' ] == 'T_VARIABLE') {
46 46
                 $numberOfParameters++;
47 47
             }
48 48
         }
Please login to merge, or discard this patch.