@@ -18,10 +18,10 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Get all of the listeners and their corresponding events. |
20 | 20 | * |
21 | - * @param iterable $paths |
|
21 | + * @param \Symfony\Component\Finder\Finder $paths |
|
22 | 22 | * @param $composerPath |
23 | 23 | * @param $composerNamespace |
24 | - * @param $command |
|
24 | + * @param Commands\CheckPsr4 $command |
|
25 | 25 | * |
26 | 26 | * @return void |
27 | 27 | */ |
@@ -96,6 +96,9 @@ discard block |
||
96 | 96 | return Str::startsWith($buffer, '<?php'); |
97 | 97 | } |
98 | 98 | |
99 | + /** |
|
100 | + * @param string $correctNamespace |
|
101 | + */ |
|
99 | 102 | protected static function doNamespaceCorrection($absFilePath, $currentNamespace, $correctNamespace) |
100 | 103 | { |
101 | 104 | event('laravel_microscope.namespace_fixing', get_defined_vars()); |
@@ -103,6 +106,9 @@ discard block |
||
103 | 106 | event('laravel_microscope.namespace_fixed', get_defined_vars()); |
104 | 107 | } |
105 | 108 | |
109 | + /** |
|
110 | + * @param string $correctNamespace |
|
111 | + */ |
|
106 | 112 | private static function changedNamespaces($class, $currentNamespace, $correctNamespace) |
107 | 113 | { |
108 | 114 | $_currentClass = $currentNamespace.'\\'.$class; |
@@ -3,10 +3,10 @@ |
||
3 | 3 | namespace Imanghafoori\LaravelMicroscope; |
4 | 4 | |
5 | 5 | use Illuminate\Support\Str; |
6 | -use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
7 | 6 | use Imanghafoori\LaravelMicroscope\Analyzers\GetClassProperties; |
8 | 7 | use Imanghafoori\LaravelMicroscope\Analyzers\NamespaceCorrector; |
9 | 8 | use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter; |
9 | +use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
10 | 10 | use Imanghafoori\LaravelMicroscope\LaravelPaths\LaravelPaths; |
11 | 11 | |
12 | 12 | class CheckNamespaces |
@@ -4,11 +4,11 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Console\Command; |
6 | 6 | use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson; |
7 | -use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
8 | 7 | use Imanghafoori\LaravelMicroscope\Analyzers\FunctionCall; |
9 | 8 | use Imanghafoori\LaravelMicroscope\Analyzers\Ifs; |
10 | 9 | use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter; |
11 | 10 | use Imanghafoori\LaravelMicroscope\ErrorTypes\CompactCall; |
11 | +use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
12 | 12 | use Imanghafoori\LaravelMicroscope\SpyClasses\RoutePaths; |
13 | 13 | |
14 | 14 | class CheckCompact extends Command |
@@ -4,9 +4,9 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Console\Command; |
6 | 6 | use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson; |
7 | -use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
8 | 7 | use Imanghafoori\LaravelMicroscope\Analyzers\Refactor; |
9 | 8 | use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter; |
9 | +use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
10 | 10 | |
11 | 11 | class CheckEarlyReturns extends Command |
12 | 12 | { |
@@ -4,9 +4,9 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Console\Command; |
6 | 6 | use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson; |
7 | -use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
8 | 7 | use Imanghafoori\LaravelMicroscope\Analyzers\Refactor; |
9 | 8 | use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter; |
9 | +use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
10 | 10 | use Imanghafoori\LaravelMicroscope\Refactors\SyntaxNormalizer; |
11 | 11 | |
12 | 12 | class CheckEndIf extends Command |
@@ -4,9 +4,9 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Console\Command; |
6 | 6 | use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson; |
7 | -use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
8 | 7 | use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter; |
9 | 8 | use Imanghafoori\LaravelMicroscope\GenerateCode; |
9 | +use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
10 | 10 | |
11 | 11 | class CheckExpansions extends Command |
12 | 12 | { |
@@ -7,10 +7,10 @@ |
||
7 | 7 | use Illuminate\Support\Facades\View; |
8 | 8 | use Illuminate\Support\Str; |
9 | 9 | use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson; |
10 | -use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
11 | 10 | use Imanghafoori\LaravelMicroscope\CheckNamespaces; |
12 | 11 | use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter; |
13 | 12 | use Imanghafoori\LaravelMicroscope\FileReaders\Paths; |
13 | +use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
14 | 14 | use Imanghafoori\LaravelMicroscope\LaravelPaths\LaravelPaths; |
15 | 15 | use Imanghafoori\LaravelMicroscope\SpyClasses\RoutePaths; |
16 | 16 | use Symfony\Component\Finder\Finder; |
@@ -5,12 +5,12 @@ |
||
5 | 5 | use Illuminate\Console\Command; |
6 | 6 | use Illuminate\Support\Facades\View; |
7 | 7 | use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson; |
8 | -use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
9 | 8 | use Imanghafoori\LaravelMicroscope\Analyzers\FunctionCall; |
10 | 9 | use Imanghafoori\LaravelMicroscope\BladeFiles; |
11 | 10 | use Imanghafoori\LaravelMicroscope\Checks\CheckViewFilesExistence; |
12 | 11 | use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter; |
13 | 12 | use Imanghafoori\LaravelMicroscope\ErrorTypes\BladeFile; |
13 | +use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
14 | 14 | use Imanghafoori\LaravelMicroscope\SpyClasses\RoutePaths; |
15 | 15 | |
16 | 16 | class CheckViews extends Command |
@@ -3,10 +3,10 @@ |
||
3 | 3 | namespace Imanghafoori\LaravelMicroscope; |
4 | 4 | |
5 | 5 | use Illuminate\Support\Str; |
6 | -use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
7 | 6 | use Imanghafoori\LaravelMicroscope\Analyzers\FunctionCall; |
8 | 7 | use Imanghafoori\LaravelMicroscope\Analyzers\NamespaceCorrector; |
9 | 8 | use Imanghafoori\LaravelMicroscope\Analyzers\Refactor; |
9 | +use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
10 | 10 | use Imanghafoori\LaravelMicroscope\Stubs\ServiceProviderStub; |
11 | 11 | |
12 | 12 | class GenerateCode |
@@ -4,9 +4,9 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Events\Dispatcher; |
6 | 6 | use Illuminate\Support\Str; |
7 | -use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
8 | 7 | use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter; |
9 | 8 | use Imanghafoori\LaravelMicroscope\ErrorReporters\PendingError; |
9 | +use Imanghafoori\LaravelMicroscope\LaravelPaths\FilePath; |
|
10 | 10 | use ReflectionException; |
11 | 11 | use ReflectionFunction; |
12 | 12 |