Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| FakeMethod | |
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\Fakers\CheckBaseClassFaker; |
| 5 | use Apie\Faker\Fakers\UseFakeMethodFaker; |
| 6 | use Attribute; |
| 7 | |
| 8 | /** |
| 9 | * Adding a FakeMethod attribute allows you to specify a static method to be used |
| 10 | * to create a new instance with some random data. |
| 11 | * @see UseFakeMethodFaker |
| 12 | * @see CheckBaseClassFaker |
| 13 | */ |
| 14 | #[Attribute(Attribute::IS_REPEATABLE|Attribute::TARGET_CLASS)] |
| 15 | final class FakeMethod |
| 16 | { |
| 17 | public string $methodName; |
| 18 | |
| 19 | public function __construct(string $methodName) |
| 20 | { |
| 21 | $this->methodName = $methodName; |
| 22 | } |
| 23 | } |