Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
22 | 47 | public function generateForProperty(FieldMetadata $field, FakeMock $fakemock, ?string $group = null) |
|
23 | { |
||
24 | 47 | if ($field->configuration->faker) { |
|
25 | return |
||
26 | 24 | $this->fakerRegistry->getGeneratorForField($field)->{$field->configuration->faker}( |
|
27 | 24 | ...(array) $field->configuration->arguments |
|
28 | ); |
||
29 | } |
||
30 | $format = |
||
31 | 27 | $this->fakerRegistry->getGuesserForLocale($field->configuration->locale) |
|
32 | 27 | ->guessFormat($field->property->getName()); |
|
33 | |||
34 | 27 | if ($format) { |
|
35 | 12 | return $format(); |
|
36 | } |
||
37 | |||
38 | 19 | return null; |
|
39 | } |
||
41 |