Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Jan 15, 2025
1 parent ffa1a12 commit 8f0b027
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 5 additions & 3 deletions src/Illuminate/Database/Eloquent/Attributes/UseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ class UseFactory
/**
* Create a new attribute instance.
*
* @param class-string $factoryClass
* @param class-string $factoryClass
* @return void
*/
public function __construct(public string $factoryClass) {}
}
public function __construct(public string $factoryClass)
{
}
}
3 changes: 2 additions & 1 deletion src/Illuminate/Database/Eloquent/Factories/HasFactory.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

namespace Illuminate\Database\Eloquent\Factories;

use Illuminate\Database\Eloquent\Attributes\UseFactory;

/**
Expand Down Expand Up @@ -53,7 +54,7 @@ protected static function getUseFactoryAttribute()

$factory = new $useFactory->factoryClass;

$factory->guessModelNamesUsing(fn() => static::class);
$factory->guessModelNamesUsing(fn () => static::class);

return $factory;
}
Expand Down
4 changes: 1 addition & 3 deletions tests/Database/DatabaseEloquentModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
use ReflectionClass;
use stdClass;


include_once 'Enums.php';

class DatabaseEloquentModelTest extends TestCase
Expand Down Expand Up @@ -4007,7 +4006,6 @@ class CustomEloquentCollection extends Collection
{
}


class EloquentModelWithUseFactoryAttributeFactory extends Factory
{
public function definition()
Expand All @@ -4020,4 +4018,4 @@ public function definition()
class EloquentModelWithUseFactoryAttribute extends Model
{
use HasFactory;
}
}

0 comments on commit 8f0b027

Please sign in to comment.