mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-17 17:47:13 +00:00
composer fix-style
This commit is contained in:
@@ -628,7 +628,7 @@ class ModelsCommand extends Command
|
||||
get_class($model->newModelQuery())
|
||||
);
|
||||
$modelName = $this->getClassNameInDestinationFile(
|
||||
new \ReflectionClass($model),
|
||||
new ReflectionClass($model),
|
||||
get_class($model)
|
||||
);
|
||||
$this->setMethod($name, $builder . '|' . $modelName, $args, $comment);
|
||||
@@ -712,10 +712,10 @@ class ModelsCommand extends Command
|
||||
) {
|
||||
if ($relationObj instanceof BelongsToMany) {
|
||||
$pivot = get_class($relationObj->newPivot());
|
||||
if (!in_array($pivot,[ Pivot::class, MorphPivot::class])) {
|
||||
if (!in_array($pivot, [Pivot::class, MorphPivot::class])) {
|
||||
$this->setProperty(
|
||||
$relationObj->getPivotAccessor(),
|
||||
$this->getClassNameInDestinationFile($model,$pivot),
|
||||
$this->getClassNameInDestinationFile($model, $pivot),
|
||||
true,
|
||||
false
|
||||
);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Pivot\Models;
|
||||
|
||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Pivot\Models\Pivots\CustomPivot;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Pivot\Models\Pivots;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\Pivot;
|
||||
|
||||
class CustomPivot extends Pivot
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Pivot;
|
||||
|
||||
use Barryvdh\LaravelIdeHelper\Console\ModelsCommand;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Pivot\Models;
|
||||
|
||||
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Pivot\Models\Pivots\CustomPivot;
|
||||
@@ -27,6 +29,8 @@ class ModelWithPivot extends Model
|
||||
}
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Pivot\Models\Pivots;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\Pivot;
|
||||
@@ -41,5 +45,4 @@ use Illuminate\Database\Eloquent\Relations\Pivot;
|
||||
*/
|
||||
class CustomPivot extends Pivot
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user