| Conditions | 5 |
| Paths | 5 |
| Total Lines | 23 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function getValue(string $argumentName, string $argumentType = '') |
||
|
|
|||
| 18 | { |
||
| 19 | if ($argumentType === 'int') { |
||
| 20 | return $this->faker->numberBetween(1, 100); |
||
| 21 | } |
||
| 22 | |||
| 23 | if ($argumentType === 'string') { |
||
| 24 | return $this->faker->sentence(); |
||
| 25 | } |
||
| 26 | |||
| 27 | if ($argumentType === 'bool') { |
||
| 28 | return $this->faker->boolean(50); |
||
| 29 | } |
||
| 30 | |||
| 31 | |||
| 32 | $argumentValue = app($argumentType); |
||
| 33 | |||
| 34 | if ($argumentValue instanceof Model) { |
||
| 35 | $argumentValue = $this->getModelInstance($argumentValue); |
||
| 36 | } |
||
| 37 | |||
| 38 | return $argumentValue; |
||
| 39 | } |
||
| 40 | |||
| 53 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.