You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using array shape with optional entries array{client?: array{id: string}} one cannot use null coalescing operator to handle undefined entry as $arr['client']['id'] ?? '' which is valid code https://3v4l.org/kLE5G
PHPStan says
Offset 'client' does not exist on array(?'client' => array('id' => string)).
Bug report
When using array shape with optional entries
array{client?: array{id: string}}
one cannot use null coalescing operator to handle undefined entry as$arr['client']['id'] ?? ''
which is valid code https://3v4l.org/kLE5GPHPStan says
Code snippet that reproduces the problem
https://phpstan.org/r/3d07aaf8-0cd3-467e-9173-c3ba9dd3369b
Expected output
No errors
The text was updated successfully, but these errors were encountered: