@@ -80,6 +80,9 @@ |
||
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
83 | + /** |
|
84 | + * @param string $msg |
|
85 | + */ |
|
83 | 86 | protected function warnDumping($msg) |
84 | 87 | { |
85 | 88 | $this->info('It seems composer has some trouble with autoload...'); |
@@ -6,14 +6,14 @@ |
||
6 | 6 | use Illuminate\Database\Eloquent\Model; |
7 | 7 | use Illuminate\Support\Composer; |
8 | 8 | use Illuminate\Support\Str; |
9 | -use Imanghafoori\LaravelMicroscope\Analyzers\FilePath; |
|
10 | -use Imanghafoori\LaravelMicroscope\SpyClasses\RoutePaths; |
|
11 | 9 | use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson; |
10 | +use Imanghafoori\LaravelMicroscope\Analyzers\FilePath; |
|
12 | 11 | use Imanghafoori\LaravelMicroscope\CheckBladeFiles; |
13 | 12 | use Imanghafoori\LaravelMicroscope\CheckClasses; |
14 | 13 | use Imanghafoori\LaravelMicroscope\Checks\CheckClassReferences; |
15 | 14 | use Imanghafoori\LaravelMicroscope\Contracts\FileCheckContract; |
16 | 15 | use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter; |
16 | +use Imanghafoori\LaravelMicroscope\SpyClasses\RoutePaths; |
|
17 | 17 | use Imanghafoori\LaravelMicroscope\Traits\LogsErrors; |
18 | 18 | use Imanghafoori\LaravelMicroscope\Traits\ScansFiles; |
19 | 19 |
@@ -50,8 +50,8 @@ |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
53 | - * @param $incorrectNamespace |
|
54 | - * @param $correctNamespace |
|
53 | + * @param string $incorrectNamespace |
|
54 | + * @param string $correctNamespace |
|
55 | 55 | * |
56 | 56 | * @return array |
57 | 57 | */ |
@@ -82,6 +82,10 @@ |
||
82 | 82 | } |
83 | 83 | } |
84 | 84 | |
85 | + /** |
|
86 | + * @param ErrorPrinter $errorPrinter |
|
87 | + * @param \Symfony\Component\Console\Helper\ProgressBar $bar |
|
88 | + */ |
|
85 | 89 | private function checkRouteDefinitions($errorPrinter, $routes, $bar) |
86 | 90 | { |
87 | 91 | foreach ($routes as $route) { |
@@ -6,8 +6,8 @@ |
||
6 | 6 | use Illuminate\Console\Command; |
7 | 7 | use Illuminate\Routing\Router; |
8 | 8 | use Illuminate\Support\Str; |
9 | -use Imanghafoori\LaravelMicroscope\Analyzers\FilePath; |
|
10 | 9 | use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson; |
10 | +use Imanghafoori\LaravelMicroscope\Analyzers\FilePath; |
|
11 | 11 | use Imanghafoori\LaravelMicroscope\Checks\CheckRouteCalls; |
12 | 12 | use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter; |
13 | 13 | use Imanghafoori\LaravelMicroscope\Traits\LogsErrors; |
@@ -63,6 +63,9 @@ |
||
63 | 63 | } |
64 | 64 | } |
65 | 65 | |
66 | + /** |
|
67 | + * @return string |
|
68 | + */ |
|
66 | 69 | private function stringify($event) |
67 | 70 | { |
68 | 71 | return is_object($event) ? get_class($event) : $event; |
@@ -14,7 +14,7 @@ |
||
14 | 14 | /** |
15 | 15 | * Get all of the listeners and their corresponding events. |
16 | 16 | * |
17 | - * @param iterable $files |
|
17 | + * @param \Symfony\Component\Finder\Finder $files |
|
18 | 18 | * @param FileCheckContractAlias $fileCheckContract |
19 | 19 | * |
20 | 20 | * @return void |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Imanghafoori\LaravelMicroscope; |
4 | 4 | |
5 | -use Illuminate\Database\Eloquent\Model; |
|
6 | 5 | use Illuminate\Support\Str; |
7 | 6 | use Imanghafoori\LaravelMicroscope\Analyzers\GetClassProperties; |
8 | 7 | use Imanghafoori\LaravelMicroscope\Analyzers\ParseUseStatement; |
@@ -3,9 +3,9 @@ |
||
3 | 3 | namespace Imanghafoori\LaravelMicroscope\Commands; |
4 | 4 | |
5 | 5 | use Illuminate\Console\Command; |
6 | -use Imanghafoori\LaravelMicroscope\CheckNamespaces; |
|
7 | -use Imanghafoori\LaravelMicroscope\Analyzers\FilePath; |
|
8 | 6 | use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson; |
7 | +use Imanghafoori\LaravelMicroscope\Analyzers\FilePath; |
|
8 | +use Imanghafoori\LaravelMicroscope\CheckNamespaces; |
|
9 | 9 | use Imanghafoori\LaravelMicroscope\Contracts\FileCheckContract; |
10 | 10 | use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter; |
11 | 11 | use Imanghafoori\LaravelMicroscope\Traits\LogsErrors; |
@@ -53,6 +53,10 @@ discard block |
||
53 | 53 | $this->pendError($absPath, $lineNumber, $relatedModel, 'badRelation', $header); |
54 | 54 | } |
55 | 55 | |
56 | + /** |
|
57 | + * @param string $key |
|
58 | + * @param string $header |
|
59 | + */ |
|
56 | 60 | public function pendError($path, $lineNumber, $absent, $key, $header) |
57 | 61 | { |
58 | 62 | array_push($this->counts[$key], (new PendingError($key)) |
@@ -89,6 +93,9 @@ discard block |
||
89 | 93 | ->link($absPath, $lineNumber)); |
90 | 94 | } |
91 | 95 | |
96 | + /** |
|
97 | + * @param integer $len |
|
98 | + */ |
|
92 | 99 | public function print($msg, $path = '| ', $len = null) |
93 | 100 | { |
94 | 101 | ! $len && $len = PendingError::$maxLength + 1; |
@@ -104,6 +111,9 @@ discard block |
||
104 | 111 | $this->printer->writeln($path.$msg.str_repeat(' ', $len).'|'); |
105 | 112 | } |
106 | 113 | |
114 | + /** |
|
115 | + * @param string $msg |
|
116 | + */ |
|
107 | 117 | public function printHeader($msg) |
108 | 118 | { |
109 | 119 | $this->print(''); |
@@ -14,7 +14,7 @@ discard block |
||
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 | 20 | * @param FileCheckContractAlias $fileCheckContract |
@@ -72,6 +72,9 @@ discard block |
||
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 |
||
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()); |
@@ -112,6 +118,10 @@ discard block |
||
112 | 118 | return $migrationDirs; |
113 | 119 | } |
114 | 120 | |
121 | + /** |
|
122 | + * @param FileCheckContractAlias $fileCheckContract |
|
123 | + * @param string $correctNamespace |
|
124 | + */ |
|
115 | 125 | private static function ask($fileCheckContract, $correctNamespace) |
116 | 126 | { |
117 | 127 | return $fileCheckContract->getOutput()->confirm('Do you want to change it to: '.$correctNamespace, true); |
@@ -70,7 +70,7 @@ |
||
70 | 70 | /** |
71 | 71 | * Get all of the listeners and their corresponding events. |
72 | 72 | * |
73 | - * @param iterable $classes |
|
73 | + * @param \Symfony\Component\Finder\Finder $classes |
|
74 | 74 | * |
75 | 75 | * @return void |
76 | 76 | */ |
@@ -4,17 +4,17 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Console\Command; |
6 | 6 | use Illuminate\Support\Facades\View; |
7 | +use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson; |
|
7 | 8 | use Imanghafoori\LaravelMicroscope\Analyzers\FilePath; |
8 | -use Imanghafoori\LaravelMicroscope\SpyClasses\RoutePaths; |
|
9 | +use Imanghafoori\LaravelMicroscope\Analyzers\FunctionCall; |
|
9 | 10 | use Imanghafoori\LaravelMicroscope\Analyzers\GetClassProperties; |
10 | -use Imanghafoori\LaravelMicroscope\Analyzers\ComposerJson; |
|
11 | 11 | use Imanghafoori\LaravelMicroscope\CheckBladeFiles; |
12 | 12 | use Imanghafoori\LaravelMicroscope\CheckClasses; |
13 | 13 | use Imanghafoori\LaravelMicroscope\Checks\CheckClassReferences; |
14 | 14 | use Imanghafoori\LaravelMicroscope\Checks\CheckRouteCalls; |
15 | -use Imanghafoori\LaravelMicroscope\Analyzers\FunctionCall; |
|
16 | 15 | use Imanghafoori\LaravelMicroscope\Checks\CheckViewFilesExistence; |
17 | 16 | use Imanghafoori\LaravelMicroscope\ErrorReporters\ErrorPrinter; |
17 | +use Imanghafoori\LaravelMicroscope\SpyClasses\RoutePaths; |
|
18 | 18 | use Imanghafoori\LaravelMicroscope\Traits\LogsErrors; |
19 | 19 | |
20 | 20 | class CheckViews extends Command |