Completed
Push — master ( cce510...3af3d9 )
by Iman
01:26
created
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/Commands/CheckCompact.php 1 patch
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@
 block discarded – undo
3 3
 namespace Imanghafoori\LaravelMicroscope\Commands;
4 4
 
5 5
 use Illuminate\Console\Command;
6
-use Imanghafoori\LaravelMicroscope\Analyzers\Ifs;
6
+use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson;
7 7
 use Imanghafoori\LaravelMicroscope\Analyzers\FilePath;
8
-use Imanghafoori\LaravelMicroscope\SpyClasses\RoutePaths;
9 8
 use Imanghafoori\LaravelMicroscope\Analyzers\FunctionCall;
10
-use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson;
9
+use Imanghafoori\LaravelMicroscope\Analyzers\Ifs;
11 10
 use Imanghafoori\LaravelMicroscope\ErrorTypes\CompactCall;
11
+use Imanghafoori\LaravelMicroscope\SpyClasses\RoutePaths;
12 12
 
13 13
 class CheckCompact extends Command
14 14
 {
Please login to merge, or discard this patch.
src/LaravelMicroscopeServiceProvider.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
8 8
 use Illuminate\Support\Facades\Route;
9 9
 use Illuminate\Support\ServiceProvider;
10 10
 use Imanghafoori\LaravelMicroscope\Commands;
11
+use Imanghafoori\LaravelMicroscope\ErrorReporters\ConsolePrinterInstaller;
11 12
 use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter;
12 13
 use Imanghafoori\LaravelMicroscope\SpyClasses\SpyDispatcher;
13 14
 use Imanghafoori\LaravelMicroscope\SpyClasses\SpyGate;
14 15
 use Imanghafoori\LaravelMicroscope\SpyClasses\SpyRouter;
15
-use Imanghafoori\LaravelMicroscope\ErrorReporters\ConsolePrinterInstaller;
16 16
 
17 17
 class LaravelMicroscopeServiceProvider extends ServiceProvider
18 18
 {
Please login to merge, or discard this patch.
src/CheckNamespaces.php 2 patches
Doc Comments   +11 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,10 +14,10 @@  discard block
 block discarded – undo
14 14
     /**
15 15
      * Get all of the listeners and their corresponding events.
16 16
      *
17
-     * @param  iterable  $paths
17
+     * @param  \Symfony\Component\Finder\Finder  $paths
18 18
      * @param  $composerPath
19 19
      * @param  $composerNamespace
20
-     * @param  $command
20
+     * @param  Commands\CheckPsr4 $command
21 21
      *
22 22
      * @return void
23 23
      */
@@ -72,6 +72,9 @@  discard block
 block discarded – undo
72 72
         }
73 73
     }
74 74
 
75
+    /**
76
+     * @param string $relativePath
77
+     */
75 78
     private static function warn($currentNamespace, $relativePath)
76 79
     {
77 80
         $p = app(ErrorPrinter::class);
@@ -93,6 +96,9 @@  discard block
 block discarded – undo
93 96
         return Str::startsWith($buffer, '<?php');
94 97
     }
95 98
 
99
+    /**
100
+     * @param string $correctNamespace
101
+     */
96 102
     protected static function doNamespaceCorrection($absFilePath, $currentNamespace, $correctNamespace)
97 103
     {
98 104
         event('laravel_microscope.namespace_fixing', get_defined_vars());
@@ -100,6 +106,9 @@  discard block
 block discarded – undo
100 106
         event('laravel_microscope.namespace_fixed', get_defined_vars());
101 107
     }
102 108
 
109
+    /**
110
+     * @param string $correctNamespace
111
+     */
103 112
     private static function ask($command, $correctNamespace)
104 113
     {
105 114
         return $command->getOutput()->confirm('Do you want to change it to: '.$correctNamespace, true);
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Support\Str;
6 6
 use Imanghafoori\LaravelMicroscope\Analyzers\FilePath;
7
-use Imanghafoori\LaravelMicroscope\LaravelPaths\MigrationPaths;
8 7
 use Imanghafoori\LaravelMicroscope\Analyzers\GetClassProperties;
9 8
 use Imanghafoori\LaravelMicroscope\Analyzers\NamespaceCorrector;
10 9
 use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter;
10
+use Imanghafoori\LaravelMicroscope\LaravelPaths\MigrationPaths;
11 11
 
12 12
 class CheckNamespaces
13 13
 {
Please login to merge, or discard this patch.
src/Checks/RoutelessActions.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -10,6 +10,9 @@  discard block
 block discarded – undo
10 10
 
11 11
 class RoutelessActions
12 12
 {
13
+    /**
14
+     * @param \Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter $errorPrinter
15
+     */
13 16
     public function check($errorPrinter)
14 17
     {
15 18
         $psr4 = ComposerJson::readKey('autoload.psr-4');
@@ -99,6 +102,9 @@  discard block
 block discarded – undo
99 102
         return $routelessActions;
100 103
     }
101 104
 
105
+    /**
106
+     * @param string $fullNamespace
107
+     */
102 108
     private function checkControllerActionsForRoutes($errorPrinter, $fullNamespace, $tokens, $absFilePath)
103 109
     {
104 110
         if ($this->isLaravelController($fullNamespace)) {
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@
 block discarded – undo
3 3
 namespace Imanghafoori\LaravelMicroscope\Checks;
4 4
 
5 5
 use Illuminate\Routing\Controller;
6
-use Imanghafoori\LaravelMicroscope\Analyzers\FilePath;
7
-use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson;
8 6
 use Imanghafoori\LaravelMicroscope\Analyzers\ClassMethods;
7
+use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson;
8
+use Imanghafoori\LaravelMicroscope\Analyzers\FilePath;
9 9
 use Imanghafoori\LaravelMicroscope\Analyzers\NamespaceCorrector;
10 10
 
11 11
 class RoutelessActions
Please login to merge, or discard this patch.
src/Commands/CheckRoutes.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -67,6 +67,9 @@
 block discarded – undo
67 67
         }
68 68
     }
69 69
 
70
+    /**
71
+     * @param ErrorPrinter $errorPrinter
72
+     */
70 73
     private function checkRouteDefinitions($errorPrinter, $routes)
71 74
     {
72 75
         foreach ($routes as $route) {
Please login to merge, or discard this patch.
Unused Use Statements   +3 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,19 +3,14 @@
 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 Illuminate\Routing\Controller;
7
+use Illuminate\Routing\Router;
8
+use Illuminate\Support\Str;
10 9
 use Imanghafoori\LaravelMicroscope\CheckBladeFiles;
11
-use Imanghafoori\LaravelMicroscope\Traits\LogsErrors;
12
-use Imanghafoori\LaravelMicroscope\Analyzers\FilePath;
13
-use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson;
14 10
 use Imanghafoori\LaravelMicroscope\Checks\CheckRouteCalls;
15
-use Imanghafoori\LaravelMicroscope\Analyzers\ClassMethods;
16 11
 use Imanghafoori\LaravelMicroscope\Checks\RoutelessActions;
17 12
 use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter;
18
-use Imanghafoori\LaravelMicroscope\Analyzers\NamespaceCorrector;
13
+use Imanghafoori\LaravelMicroscope\Traits\LogsErrors;
19 14
 
20 15
 class CheckRoutes extends Command
21 16
 {
Please login to merge, or discard this patch.