|
7 | 7 | use CrestApps\CodeGenerator\Support\Helpers; |
8 | 8 | use CrestApps\CodeGenerator\Support\ResourceMapper; |
9 | 9 | use CrestApps\CodeGenerator\Support\Str; |
10 | | -use DB; |
| 10 | +use Illuminate\Support\Facades\DB; |
11 | 11 | use Exception; |
12 | | -use File; |
| 12 | +use Illuminate\Support\Facades\File; |
13 | 13 | use Illuminate\Database\Eloquent\Model; |
14 | 14 |
|
15 | 15 | class ForeignRelationship implements JsonWriter |
@@ -62,7 +62,7 @@ class ForeignRelationship implements JsonWriter |
62 | 62 | /** |
63 | 63 | * Instance of the foreign model. |
64 | 64 | * |
65 | | - * @var Illuminate\Database\Eloquent\Model |
| 65 | + * @var Model |
66 | 66 | */ |
67 | 67 | private $foreignModel; |
68 | 68 |
|
@@ -215,8 +215,6 @@ protected function guessForeignField() |
215 | 215 | /** |
216 | 216 | * Gets the relation's type. |
217 | 217 | * |
218 | | - * @param string $name |
219 | | - * |
220 | 218 | * @return string |
221 | 219 | */ |
222 | 220 | public function getType() |
@@ -289,7 +287,7 @@ protected function isModel($model) |
289 | 287 | /** |
290 | 288 | * Gets the name of the foreign model's primary key. |
291 | 289 | * |
292 | | - * @return sting |
| 290 | + * @return string |
293 | 291 | */ |
294 | 292 | public function getPrimaryKeyForForeignModel() |
295 | 293 | { |
@@ -364,7 +362,7 @@ protected function getFieldNamesFromResource() |
364 | 362 | /** |
365 | 363 | * Gets the foreign model fields from resource file |
366 | 364 | * |
367 | | - * @return mix (null | CrestApps\CodeGenerator\Models\Resource) |
| 365 | + * @return CrestApps\CodeGenerator\Models\Resource|null |
368 | 366 | */ |
369 | 367 | protected function getForeignResource() |
370 | 368 | { |
@@ -392,7 +390,7 @@ protected function getForeignModelName() |
392 | 390 | /** |
393 | 391 | * Gets a single instance of the foreign mode. |
394 | 392 | * |
395 | | - * @return Illuminate\Database\Eloquent\Model |
| 393 | + * @return Model |
396 | 394 | */ |
397 | 395 | private function getForeignModelInstance() |
398 | 396 | { |
@@ -433,7 +431,7 @@ public function toArray() |
433 | 431 | * |
434 | 432 | * @param array $options |
435 | 433 | * |
436 | | - * @return null | CrestApps\CodeGenerator\Model\ForeignRelationship |
| 434 | + * @return null | ForeignRelationship |
437 | 435 | */ |
438 | 436 | public static function get(array $options) |
439 | 437 | { |
@@ -469,7 +467,7 @@ public static function get(array $options) |
469 | 467 | * |
470 | 468 | * @param string $rawRelation |
471 | 469 | * |
472 | | - * @return null | CrestApps\CodeGenerator\Model\ForeignRelationship |
| 470 | + * @return null | ForeignRelationship |
473 | 471 | */ |
474 | 472 | public static function fromString($rawRelation) |
475 | 473 | { |
@@ -503,7 +501,7 @@ public static function fromString($rawRelation) |
503 | 501 | * @param string $fieldName |
504 | 502 | * @param string $modelPath |
505 | 503 | * |
506 | | - * @return null | CrestApps\CodeGenerator\Model\ForeignRelationship |
| 504 | + * @return null | ForeignRelationship |
507 | 505 | */ |
508 | 506 | public static function predict($fieldName, $modelPath) |
509 | 507 | { |
|
0 commit comments