1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +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 GitHub
parent e172e88274
commit ece18cd9b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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