| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function doCreateService(ContainerInterface $container): AdapterInterface |
||
| 30 | { |
||
| 31 | $options = []; |
||
| 32 | $options[] = $this->options['root']; |
||
| 33 | $options[] = $this->options['writeFlags'] ?? null; |
||
| 34 | |||
| 35 | if (isset($this->options['linkHandling'])) { // since 1.0.8 |
||
| 36 | $options[] = $this->options['linkHandling']; |
||
| 37 | |||
| 38 | if (isset($this->options['permissions'])) { // since 1.0.14 |
||
| 39 | $options[] = $this->options['permissions']; |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 43 | return new Adapter(...$options); |
||
|
|
|||
| 44 | } |
||
| 45 | |||
| 53 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: