mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Add documentation for recently-added features
This commit is contained in:
parent
e10b2c0fd4
commit
896790d30c
@ -37,6 +37,12 @@ Psalm uses an XML config file. A barebones example looks like this:
|
||||
When `true`, strings can be coerced to [`class-string`](supported_annotations.md#class-constants), with Psalm emitting a `TypeCoercion` issue. If disabled, that issue changes to a more serious one. Defaults to `true`.
|
||||
- `allowStringToStandInForClass=[bool]`<br />
|
||||
When `true`, strings can be used as classes, meaning `$some_string::someMethod()` is allowed. If `false`, only class constant strings (of the form `Foo\Bar::class`) can stand in for classes, otherwise an `InvalidStringClass` issue is emitted. Defaults to `true` (no issues emitted).
|
||||
- `memoizeMethodCallResults=[bool]`<br />
|
||||
When `true`, the results of method calls without arguments passed arguments are remembered between repeated calls of that method on a given object. Defaults to `false`.
|
||||
- `hoistConstants=[bool]`<br />
|
||||
When `true`, constants defined in a function in a file are assumed to be available when requiring that file, and not just when calling that function. Defaults to `false` (i.e. constants defined in functions will *only* be available for use when that function is called)
|
||||
- `addParamDefaultToDocblockType=[bool]`<br />
|
||||
Occasionally a param default will not match up with the docblock type. By default, Psalm emits an issue. Setting this flag to `true` causes it to expand the param type to include the param default. Defaults to `false`.
|
||||
|
||||
### Running Psalm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user