@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | /** |
| 34 | 34 | * Get all of the listeners and their corresponding events. |
| 35 | 35 | * |
| 36 | - * @param iterable $files |
|
| 36 | + * @param Finder $files |
|
| 37 | 37 | * @param string $basePath |
| 38 | 38 | * |
| 39 | 39 | * @param $composerPath |
@@ -89,11 +89,11 @@ discard block |
||
| 89 | 89 | /** |
| 90 | 90 | * Get all of the listeners and their corresponding events. |
| 91 | 91 | * |
| 92 | - * @param iterable $classes |
|
| 92 | + * @param Finder $classes |
|
| 93 | 93 | * @param string $basePath |
| 94 | 94 | * |
| 95 | - * @param $composerPath |
|
| 96 | - * @param $composerNamespace |
|
| 95 | + * @param string $composerPath |
|
| 96 | + * @param string $composerNamespace |
|
| 97 | 97 | * |
| 98 | 98 | * @return void |
| 99 | 99 | */ |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Imanghafoori\LaravelMicroscope; |
| 4 | 4 | |
| 5 | +use Illuminate\Support\Str; |
|
| 5 | 6 | use ReflectionClass; |
| 6 | 7 | use ReflectionException; |
| 7 | -use Illuminate\Support\Str; |
|
| 8 | 8 | use Symfony\Component\Finder\Finder; |
| 9 | 9 | |
| 10 | 10 | class CheckClasses |
@@ -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; |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Imanghafoori\LaravelMicroscope; |
| 4 | 4 | |
| 5 | -use Illuminate\Events\Dispatcher; |
|
| 6 | 5 | use Illuminate\Contracts\Container\BindingResolutionException; |
| 6 | +use Illuminate\Events\Dispatcher; |
|
| 7 | 7 | |
| 8 | 8 | class CheckerDispatcher extends Dispatcher |
| 9 | 9 | { |
@@ -2,10 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Imanghafoori\LaravelMicroscope; |
| 4 | 4 | |
| 5 | -use Illuminate\Support\Str; |
|
| 6 | 5 | use Illuminate\Auth\Access\Gate; |
| 7 | -use Illuminate\Database\Eloquent\Model; |
|
| 8 | 6 | use Illuminate\Contracts\Container\BindingResolutionException; |
| 7 | +use Illuminate\Database\Eloquent\Model; |
|
| 8 | +use Illuminate\Support\Str; |
|
| 9 | 9 | |
| 10 | 10 | class CheckerGate extends Gate |
| 11 | 11 | { |
@@ -2,11 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Imanghafoori\LaravelMicroscope\Commands; |
| 4 | 4 | |
| 5 | -use Illuminate\Support\Str; |
|
| 6 | -use Illuminate\Routing\Router; |
|
| 7 | 5 | use Illuminate\Console\Command; |
| 8 | -use Imanghafoori\LaravelMicroscope\ErrorPrinter; |
|
| 9 | 6 | use Illuminate\Contracts\Container\BindingResolutionException; |
| 7 | +use Illuminate\Routing\Router; |
|
| 8 | +use Illuminate\Support\Str; |
|
| 9 | +use Imanghafoori\LaravelMicroscope\ErrorPrinter; |
|
| 10 | 10 | |
| 11 | 11 | class CheckRoute extends Command |
| 12 | 12 | { |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | /** |
| 52 | 52 | * Get all of the listeners and their corresponding events. |
| 53 | 53 | * |
| 54 | - * @param iterable $classes |
|
| 54 | + * @param Finder $classes |
|
| 55 | 55 | * @param string $basePath |
| 56 | 56 | * |
| 57 | 57 | * @param $composerPath |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | /** |
| 86 | 86 | * @param $method |
| 87 | - * @param $ctrl |
|
| 87 | + * @param string $ctrl |
|
| 88 | 88 | */ |
| 89 | 89 | protected static function checkViews($ctrl) |
| 90 | 90 | { |
@@ -2,15 +2,15 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Imanghafoori\LaravelMicroscope\Commands; |
| 4 | 4 | |
| 5 | -use Illuminate\Support\Str; |
|
| 6 | 5 | use Illuminate\Console\Command; |
| 7 | -use Illuminate\Support\Facades\View; |
|
| 8 | -use Symfony\Component\Finder\Finder; |
|
| 9 | 6 | use Illuminate\Routing\Controller; |
| 10 | -use Imanghafoori\LaravelMicroscope\ErrorPrinter; |
|
| 7 | +use Illuminate\Support\Facades\View; |
|
| 8 | +use Illuminate\Support\Str; |
|
| 11 | 9 | use Imanghafoori\LaravelMicroscope\CheckClasses; |
| 12 | -use Imanghafoori\LaravelMicroscope\View\ViewParser; |
|
| 10 | +use Imanghafoori\LaravelMicroscope\ErrorPrinter; |
|
| 13 | 11 | use Imanghafoori\LaravelMicroscope\GetClassProperties; |
| 12 | +use Imanghafoori\LaravelMicroscope\View\ViewParser; |
|
| 13 | +use Symfony\Component\Finder\Finder; |
|
| 14 | 14 | |
| 15 | 15 | class CheckView extends Command |
| 16 | 16 | { |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | /** |
| 33 | 33 | * Get all of the listeners and their corresponding events. |
| 34 | 34 | * |
| 35 | - * @param iterable $classes |
|
| 35 | + * @param Finder $classes |
|
| 36 | 36 | * @param string $basePath |
| 37 | 37 | * |
| 38 | 38 | * @param $composerPath |
@@ -91,11 +91,11 @@ discard block |
||
| 91 | 91 | /** |
| 92 | 92 | * Get all of the listeners and their corresponding events. |
| 93 | 93 | * |
| 94 | - * @param iterable $classes |
|
| 94 | + * @param Finder $classes |
|
| 95 | 95 | * @param string $basePath |
| 96 | 96 | * |
| 97 | - * @param $composerPath |
|
| 98 | - * @param $composerNamespace |
|
| 97 | + * @param string $composerPath |
|
| 98 | + * @param string $composerNamespace |
|
| 99 | 99 | * |
| 100 | 100 | * @return void |
| 101 | 101 | */ |
@@ -216,6 +216,9 @@ discard block |
||
| 216 | 216 | app(ErrorPrinter::class)->print('It should be: namespace '.$correctNamespace.'; '); |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | + /** |
|
| 220 | + * @param string $classPath |
|
| 221 | + */ |
|
| 219 | 222 | protected static function calculateCorrectNamespace($classPath, $path, $rootNamespace) |
| 220 | 223 | { |
| 221 | 224 | $p = explode(DIRECTORY_SEPARATOR, $classPath); |
@@ -2,9 +2,9 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Imanghafoori\LaravelMicroscope; |
| 4 | 4 | |
| 5 | +use Illuminate\Support\Str; |
|
| 5 | 6 | use ReflectionClass; |
| 6 | 7 | use ReflectionException; |
| 7 | -use Illuminate\Support\Str; |
|
| 8 | 8 | use Symfony\Component\Finder\Finder; |
| 9 | 9 | |
| 10 | 10 | class DiscoverClasses |
@@ -67,6 +67,9 @@ |
||
| 67 | 67 | $this->end(); |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | + /** |
|
| 71 | + * @param string $msg |
|
| 72 | + */ |
|
| 70 | 73 | function print($msg) |
| 71 | 74 | { |
| 72 | 75 | $len = 81 - strlen($msg); |
@@ -2,10 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Imanghafoori\LaravelMicroscope; |
| 4 | 4 | |
| 5 | -use ReflectionClass; |
|
| 6 | 5 | use Illuminate\Database\Eloquent\Model; |
| 7 | -use Imanghafoori\LaravelMicroscope\View\ModelParser; |
|
| 8 | 6 | use Imanghafoori\LaravelMicroscope\Commands\CheckView; |
| 7 | +use Imanghafoori\LaravelMicroscope\View\ModelParser; |
|
| 8 | +use ReflectionClass; |
|
| 9 | 9 | |
| 10 | 10 | class ModelRelations |
| 11 | 11 | { |
@@ -315,7 +315,7 @@ |
||
| 315 | 315 | * Parses PHP code. |
| 316 | 316 | * |
| 317 | 317 | * @param $tokens |
| 318 | - * @param null $forClass |
|
| 318 | + * @param string $forClass |
|
| 319 | 319 | * |
| 320 | 320 | * @return array of [class => [alias => class, ...]] |
| 321 | 321 | */ |