Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
6 / 6 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| MaxfieldFactory | |
100.00% |
6 / 6 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| class | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| defaults | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace App\Factory; |
| 6 | |
| 7 | use App\Entity\Maxfield; |
| 8 | use Zenstruck\Foundry\Persistence\PersistentObjectFactory; |
| 9 | |
| 10 | /** |
| 11 | * @extends PersistentObjectFactory<Maxfield> |
| 12 | */ |
| 13 | final class MaxfieldFactory extends PersistentObjectFactory |
| 14 | { |
| 15 | public static function class(): string |
| 16 | { |
| 17 | return Maxfield::class; |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * @return array<string, mixed> |
| 22 | */ |
| 23 | protected function defaults(): array |
| 24 | { |
| 25 | return [ |
| 26 | 'name' => self::faker()->word(), |
| 27 | 'path' => self::faker()->slug(), |
| 28 | 'owner' => UserFactory::new(), |
| 29 | ]; |
| 30 | } |
| 31 | } |