| 1 | <?php |
||
| 11 | class ConfigurationParser extends AbstractCpParser |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var UrlTransformer |
||
| 15 | */ |
||
| 16 | protected $urlTransformer; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param string $url |
||
| 20 | * |
||
| 21 | * @return string |
||
| 22 | * @throws \Exception |
||
| 23 | */ |
||
| 24 | 3 | public function parseToJson($url) |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @return UrlTransformer |
||
| 47 | * |
||
| 48 | * @throws LogicException |
||
| 49 | */ |
||
| 50 | 2 | public function getUrlTransformer() |
|
| 58 | |||
| 59 | /** |
||
| 60 | * @param UrlTransformer $urlTransformer |
||
| 61 | */ |
||
| 62 | 3 | public function setUrlTransformer(UrlTransformer $urlTransformer) |
|
| 66 | } |
||
| 67 |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.