1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

provide documentation for ensureArrayIntOffsetsExist configuration option (#4328)

This commit is contained in:
Marco Perone 2020-10-15 01:59:28 +02:00 committed by Daniil Gentili
parent fb505df807
commit e3bb43641c
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -255,6 +255,14 @@ Setting to `false` prevents the stub from loading.
```
When `true`, Psalm will complain when referencing an explicit string offset on an array e.g. `$arr['foo']` without a user first asserting that it exists (either via an `isset` check or via an object-like array). Defaults to `false`.
#### ensureArrayIntOffsetsExist
```xml
<psalm
ensureArrayIntOffsetsExist="[bool]"
>
```
When `true`, Psalm will complain when referencing an explicit integer offset on an array e.g. `$arr[7]` without a user first asserting that it exists (either via an `isset` check or via an object-like array). Defaults to `false`.
#### phpVersion
```xml
<psalm