Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| FakeFile | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\Core\Attributes; |
| 3 | |
| 4 | use Apie\Faker\FileFakerFactory; |
| 5 | use Apie\Faker\Interfaces\ApieFileFaker; |
| 6 | use Attribute; |
| 7 | |
| 8 | /** |
| 9 | * Adding a FakeFile attribute allows you to specify that this is an uploaded file |
| 10 | * and that is should use file fakers of a specific class. |
| 11 | * @see FileFakerFactory |
| 12 | */ |
| 13 | #[Attribute(Attribute::IS_REPEATABLE|Attribute::TARGET_CLASS)] |
| 14 | final class FakeFile |
| 15 | { |
| 16 | /** |
| 17 | * @param class-string<ApieFileFaker> $className |
| 18 | */ |
| 19 | public function __construct(public $className) |
| 20 | { |
| 21 | } |
| 22 | } |