Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| ClosureFaker | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| supports | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| fakeFor | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\Faker\Fakers; |
| 3 | |
| 4 | use Apie\Faker\Interfaces\ApieClassFaker; |
| 5 | use Faker\Generator; |
| 6 | use ReflectionClass; |
| 7 | |
| 8 | /** @implements ApieClassFaker<\Closure> */ |
| 9 | class ClosureFaker implements ApieClassFaker |
| 10 | { |
| 11 | public function supports(ReflectionClass $class): bool |
| 12 | { |
| 13 | return $class->name === \Closure::class; |
| 14 | } |
| 15 | |
| 16 | public function fakeFor(Generator $generator, ReflectionClass $class): \Closure |
| 17 | { |
| 18 | return function () { |
| 19 | }; |
| 20 | } |
| 21 | } |