Closed ruudk closed 2 months ago
Even though the code works perfectly fine, PHPStan doesn't understand it.
Offset 'revindex0' does not exist on array{parent: array{index0: int<1, max>, index: int<2, max>, first: false, revindex0?: int, revindex?: int, length: int<0, max>, last?: bool}. Offset 'revindex' does not exist on array{parent: array{index0: int<1, max>, index: int<2, max>, first: false, revindex0: int, revindex?: int, length: int<0, max>, last?: bool}.
Since we want to work with revindex and revindex0, we can better check for their existence, instead of length.
revindex
revindex0
length
/cc @stof @fabpot
Thank you @ruudk.
Even though the code works perfectly fine, PHPStan doesn't understand it.
Since we want to work with
revindex
andrevindex0
, we can better check for their existence, instead oflength
./cc @stof @fabpot