| 1 | <?php |
||
| 11 | class RegionBranchStoreUrlJson implements RegionBranchStore |
||
| 12 | { |
||
| 13 | |||
| 14 | |||
| 15 | private $url; |
||
| 16 | |||
| 17 | /** @var RegionBranch[]|null */ |
||
| 18 | private $all=null; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * RegionBranchStoreUrlJson constructor. |
||
| 22 | * @param $url |
||
| 23 | */ |
||
| 24 | public function __construct(?UrlValue $url) |
||
| 31 | |||
| 32 | |||
| 33 | /** |
||
| 34 | * @inheritDoc |
||
| 35 | * @return RegionBranch[] |
||
| 36 | */ |
||
| 37 | public function findAll(): ?array |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @inheritDoc |
||
| 69 | */ |
||
| 70 | public function findByRegion(string $region): ?RegionBranch |
||
| 80 | |||
| 81 | public function findById(int $id): ?RegionBranch |
||
| 91 | } |
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.