$this->errors is never a sub-type of SMartins\Exceptions\JsonApi\ErrorCollection. If $this->errors can have other possible types, add them to src/JsonApi/Response.php:20.
Loading history...
41
throw new InvalidArgumentException('The errors must be an array, '.Collection::class.','.Error::class.' or '.ErrorCollection::class.'.');
The type SMartins\Exceptions\Json...nvalidArgumentException was not found. Did you mean InvalidArgumentException? If so, make sure to prefix the type with \.
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..