@@ -4,9 +4,9 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Database\Eloquent\Relations\Relation; |
6 | 6 | |
7 | -use ReflectionException; |
|
8 | 7 | use Illuminate\Support\Collection; |
9 | 8 | use ReflectionClass; |
9 | +use ReflectionException; |
|
10 | 10 | use ReflectionMethod; |
11 | 11 | |
12 | 12 | class RelationMapper |
@@ -2,16 +2,16 @@ |
||
2 | 2 | |
3 | 3 | namespace Mtolhuys\LaravelSchematics\Services; |
4 | 4 | |
5 | -use SplFileInfo; |
|
5 | +use Illuminate\Database\Eloquent\Model; |
|
6 | 6 | use PhpParser\Node; |
7 | -use RecursiveDirectoryIterator; |
|
8 | -use RecursiveIteratorIterator; |
|
9 | -use PhpParser\Node\Stmt\Class_; |
|
10 | -use PhpParser\Node\Stmt\Namespace_; |
|
11 | 7 | use PhpParser\NodeTraverser; |
12 | 8 | use PhpParser\NodeVisitor\NameResolver; |
9 | +use PhpParser\Node\Stmt\Class_; |
|
10 | +use PhpParser\Node\Stmt\Namespace_; |
|
13 | 11 | use PhpParser\ParserFactory; |
14 | -use Illuminate\Database\Eloquent\Model; |
|
12 | +use RecursiveDirectoryIterator; |
|
13 | +use RecursiveIteratorIterator; |
|
14 | +use SplFileInfo; |
|
15 | 15 | |
16 | 16 | class ModelMapper |
17 | 17 | { |
@@ -2,17 +2,17 @@ |
||
2 | 2 | |
3 | 3 | namespace Mtolhuys\LaravelSchematics\Http\Controllers; |
4 | 4 | |
5 | -use Mtolhuys\LaravelSchematics\Services\RelationMapper; |
|
6 | -use Mtolhuys\LaravelSchematics\Services\ModelMapper; |
|
7 | 5 | use Illuminate\Contracts\Routing\ResponseFactory; |
8 | -use Symfony\Component\HttpFoundation\Response; |
|
9 | 6 | use Illuminate\Contracts\View\Factory; |
10 | -use Illuminate\Support\Facades\Schema; |
|
11 | -use Illuminate\Support\Facades\Cache; |
|
12 | 7 | use Illuminate\Routing\Controller; |
8 | +use Illuminate\Support\Facades\Cache; |
|
13 | 9 | use Illuminate\Support\Facades\DB; |
10 | +use Illuminate\Support\Facades\Schema; |
|
14 | 11 | use Illuminate\View\View; |
12 | +use Mtolhuys\LaravelSchematics\Services\ModelMapper; |
|
13 | +use Mtolhuys\LaravelSchematics\Services\RelationMapper; |
|
15 | 14 | use ReflectionException; |
15 | +use Symfony\Component\HttpFoundation\Response; |
|
16 | 16 | |
17 | 17 | class SchematicsController extends Controller |
18 | 18 | { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
54 | - * @param $request |
|
54 | + * @param CreateRelationRequest $request |
|
55 | 55 | */ |
56 | 56 | public function createOptional($request): void |
57 | 57 | { |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | /** |
66 | 66 | * @param $option |
67 | - * @return mixed |
|
67 | + * @return CreateMigrationAction |
|
68 | 68 | */ |
69 | 69 | private function getCreateAction($option) |
70 | 70 | { |
@@ -3,16 +3,16 @@ |
||
3 | 3 | namespace Mtolhuys\LaravelSchematics\Http\Controllers; |
4 | 4 | |
5 | 5 | use Illuminate\Contracts\Routing\ResponseFactory; |
6 | -use Mtolhuys\LaravelSchematics\Actions\Relation\DeleteRelationAction; |
|
7 | -use Mtolhuys\LaravelSchematics\Actions\Relation\CreateRelationAction; |
|
6 | +use Illuminate\Routing\Controller; |
|
7 | +use Illuminate\Support\Facades\Cache; |
|
8 | 8 | use Mtolhuys\LaravelSchematics\Actions\Migration\CreateMigrationAction; |
9 | 9 | use Mtolhuys\LaravelSchematics\Actions\Migration\DeleteMigrationAction; |
10 | +use Mtolhuys\LaravelSchematics\Actions\Relation\CreateRelationAction; |
|
11 | +use Mtolhuys\LaravelSchematics\Actions\Relation\DeleteRelationAction; |
|
10 | 12 | use Mtolhuys\LaravelSchematics\Http\Requests\CreateRelationRequest; |
11 | 13 | use Mtolhuys\LaravelSchematics\Http\Requests\DeleteRelationRequest; |
12 | -use Symfony\Component\HttpFoundation\Response; |
|
13 | -use Illuminate\Support\Facades\Cache; |
|
14 | -use Illuminate\Routing\Controller; |
|
15 | 14 | use ReflectionException; |
15 | +use Symfony\Component\HttpFoundation\Response; |
|
16 | 16 | |
17 | 17 | class RelationsController extends Controller |
18 | 18 | { |