Completed
Push — master ( 5851cc...45352e )
by Iman
01:40
created
src/Commands/CheckPsr4.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -55,6 +55,9 @@
 block discarded – undo
55 55
         $this->composerDumpIfNeeded($errorPrinter);
56 56
     }
57 57
 
58
+    /**
59
+     * @param ErrorPrinter $errorPrinter
60
+     */
58 61
     private function composerDumpIfNeeded($errorPrinter)
59 62
     {
60 63
         if ($errorPrinter->counts['badNamespace']) {
Please login to merge, or discard this patch.
Unused Use Statements   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Console\Command;
6 6
 use Illuminate\Support\Composer;
7
-use Symfony\Component\Finder\Finder;
8 7
 use Illuminate\Support\Facades\View;
9
-use Imanghafoori\LaravelMicroscope\CheckNamespaces;
10
-use Imanghafoori\LaravelMicroscope\FileReaders\Paths;
11
-use Imanghafoori\LaravelMicroscope\Analyzers\FilePath;
12
-use Imanghafoori\LaravelMicroscope\SpyClasses\RoutePaths;
13 8
 use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson;
9
+use Imanghafoori\LaravelMicroscope\Analyzers\FilePath;
10
+use Imanghafoori\LaravelMicroscope\CheckNamespaces;
14 11
 use Imanghafoori\LaravelMicroscope\Contracts\FileCheckContract;
15 12
 use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter;
13
+use Imanghafoori\LaravelMicroscope\FileReaders\Paths;
14
+use Imanghafoori\LaravelMicroscope\LaravelPaths\MigrationPaths;
15
+use Imanghafoori\LaravelMicroscope\SpyClasses\RoutePaths;
16 16
 use Imanghafoori\LaravelMicroscope\Traits\LogsErrors;
17 17
 use Imanghafoori\LaravelMicroscope\Traits\ScansFiles;
18
-use Imanghafoori\LaravelMicroscope\LaravelPaths\MigrationPaths;
18
+use Symfony\Component\Finder\Finder;
19 19
 
20 20
 class CheckPsr4 extends Command implements FileCheckContract
21 21
 {
Please login to merge, or discard this patch.
src/Analyzers/FunctionCall.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -16,6 +16,9 @@  discard block
 block discarded – undo
16 16
         return [$nextToken, $i];
17 17
     }
18 18
 
19
+    /**
20
+     * @param string[] $tokenType
21
+     */
19 22
     public static function forwardTo($tokens, $i, $tokenType)
20 23
     {
21 24
         $i++;
@@ -46,6 +49,9 @@  discard block
 block discarded – undo
46 49
         return ($tokens[0][0] == T_CONSTANT_ENCAPSED_STRING) && ($nextToken !== '.');
47 50
     }
48 51
 
52
+    /**
53
+     * @param string $funcName
54
+     */
49 55
     public static function isGlobalCall($funcName, &$tokens, $i)
50 56
     {
51 57
         $expectedTokens = [
@@ -80,6 +86,9 @@  discard block
 block discarded – undo
80 86
         return self::checkTokens($expectedTokens, $tokens, $i);
81 87
     }
82 88
 
89
+    /**
90
+     * @param string $methodName
91
+     */
83 92
     public static function isMethodCallOnThis($methodName, &$tokens, $i)
84 93
     {
85 94
         $expectedTokens = [
Please login to merge, or discard this patch.
src/Refactors/EarlyReturns.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Imanghafoori\LaravelMicroscope\Refactors;
4 4
 
5
-use Imanghafoori\LaravelMicroscope\Analyzers\Refactor;
6 5
 use Imanghafoori\LaravelMicroscope\Analyzers\FunctionCall;
6
+use Imanghafoori\LaravelMicroscope\Analyzers\Refactor;
7 7
 
8 8
 class EarlyReturns
9 9
 {
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -71,6 +71,9 @@
 block discarded – undo
71 71
         return [$tokens, $changes];
72 72
     }
73 73
 
74
+    /**
75
+     * @return string
76
+     */
74 77
     private static function getKeyword($token)
75 78
     {
76 79
         return self::scopeKeywords[$token];
Please login to merge, or discard this patch.
src/Refactors/IfElse.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -20,6 +20,10 @@
 block discarded – undo
20 20
         }
21 21
     }
22 22
 
23
+    /**
24
+     * @param integer $elseCount
25
+     * @param integer $ifBody
26
+     */
23 27
     private static function shouldBeFlipped($elseCount, $ifBody)
24 28
     {
25 29
         $ifIsLonger = ($elseCount + 10) < $ifBody;
Please login to merge, or discard this patch.
src/Refactors/SyntaxNormalizer.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Imanghafoori\LaravelMicroscope\Refactors;
4 4
 
5
-use Imanghafoori\LaravelMicroscope\Analyzers\Ifs;
6 5
 use Imanghafoori\LaravelMicroscope\Analyzers\FunctionCall;
6
+use Imanghafoori\LaravelMicroscope\Analyzers\Ifs;
7 7
 
8 8
 class SyntaxNormalizer
9 9
 {
Please login to merge, or discard this patch.
src/Analyzers/Refactor.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -58,6 +58,9 @@
 block discarded – undo
58 58
         return $stringOutput;
59 59
     }
60 60
 
61
+    /**
62
+     * @param \Closure $refactor
63
+     */
61 64
     private static function recursiveRefactor($tokens, $refactor)
62 65
     {
63 66
         $i = $changes = 0;
Please login to merge, or discard this patch.
src/CheckClasses.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -26,6 +26,9 @@
 block discarded – undo
26 26
         }
27 27
     }
28 28
 
29
+    /**
30
+     * @param string $msg
31
+     */
29 32
     public static function warnDumping($msg)
30 33
     {
31 34
         $p = resolve(ErrorPrinter::class)->printer;
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,12 +2,12 @@
 block discarded – undo
2 2
 
3 3
 namespace Imanghafoori\LaravelMicroscope;
4 4
 
5
-use Illuminate\Support\Str;
6 5
 use Illuminate\Support\Composer;
7
-use Imanghafoori\LaravelMicroscope\Analyzers\ReplaceLine;
6
+use Illuminate\Support\Str;
8 7
 use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson;
9 8
 use Imanghafoori\LaravelMicroscope\Analyzers\GetClassProperties;
10 9
 use Imanghafoori\LaravelMicroscope\Analyzers\ParseUseStatement;
10
+use Imanghafoori\LaravelMicroscope\Analyzers\ReplaceLine;
11 11
 use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter;
12 12
 
13 13
 class CheckClasses
Please login to merge, or discard this patch.
src/Checks/RoutelessActions.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Routing\Controller;
6 6
 use Imanghafoori\LaravelMicroscope\Analyzers\ClassMethods;
7
-use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter;
8 7
 use Imanghafoori\LaravelMicroscope\Analyzers\NamespaceCorrector;
8
+use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter;
9 9
 
10 10
 class RoutelessActions
11 11
 {
Please login to merge, or discard this patch.
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -40,6 +40,9 @@  discard block
 block discarded – undo
40 40
         return $namespace.'\\'.$className;
41 41
     }
42 42
 
43
+    /**
44
+     * @param string $fullNamespace
45
+     */
43 46
     protected function isLaravelController($fullNamespace)
44 47
     {
45 48
         try {
@@ -58,6 +61,9 @@  discard block
 block discarded – undo
58 61
         return $fullNamespace;
59 62
     }
60 63
 
64
+    /**
65
+     * @param string $fullNamespace
66
+     */
61 67
     protected function checkActions($tokens, $fullNamespace, $path)
62 68
     {
63 69
         $class = ClassMethods::read($tokens);
Please login to merge, or discard this patch.
src/Commands/CheckRoutes.php 2 patches
Unused Use Statements   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,15 +3,15 @@
 block discarded – undo
3 3
 namespace Imanghafoori\LaravelMicroscope\Commands;
4 4
 
5 5
 use Exception;
6
-use Illuminate\Support\Str;
7
-use Illuminate\Routing\Router;
8 6
 use Illuminate\Console\Command;
9
-use Imanghafoori\LaravelMicroscope\Psr4Classes;
7
+use Illuminate\Routing\Router;
8
+use Illuminate\Support\Str;
10 9
 use Imanghafoori\LaravelMicroscope\BladeFiles;
11
-use Imanghafoori\LaravelMicroscope\Traits\LogsErrors;
12 10
 use Imanghafoori\LaravelMicroscope\Checks\CheckRouteCalls;
13 11
 use Imanghafoori\LaravelMicroscope\Checks\RoutelessActions;
14 12
 use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter;
13
+use Imanghafoori\LaravelMicroscope\Psr4Classes;
14
+use Imanghafoori\LaravelMicroscope\Traits\LogsErrors;
15 15
 
16 16
 class CheckRoutes extends Command
17 17
 {
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -60,6 +60,9 @@
 block discarded – undo
60 60
         return 'Error on route '.$msg;
61 61
     }
62 62
 
63
+    /**
64
+     * @param ErrorPrinter $errorPrinter
65
+     */
63 66
     private function checkRouteDefinitions($errorPrinter, $routes)
64 67
     {
65 68
         foreach ($routes as $route) {
Please login to merge, or discard this patch.