composer fix-style

This commit is contained in:
Markus Podar
2024-06-12 07:17:36 +02:00
parent 6338abb2d7
commit f0c315e4fc
5 changed files with 13 additions and 5 deletions
+3 -3
View File
@@ -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
{
}