Closed
Description
A lot of PHPDocs were invalid as they had comments at the EOL.
After PHPStan 2.1.6, which supports comments at EOL, the PHPDocs are valid but incorrect. There are array keys that are not required but are not defined as optional.
For example, in ClientEndpointsTrait we have this PHPDoc.
* @param array{
* id: string, // (REQUIRED) Script ID
* context: string, // Script context
* timeout: time, // Explicit operation timeout
* master_timeout: time, // Specify timeout for connection to master
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
* source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
* filter_path: list, // A comma-separated list of filters used to reduce the response.
* body: array, // (REQUIRED) The document
* } $params
While only the id
and body
keys are required, the rest of the keys are not optional.
Metadata
Metadata
Assignees
Labels
No labels