The class Spatie\BinaryUuid\Arrayable does not exist. Did you forget a USE statement, or did you not list all dependencies?
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your composer.json file (if available) to determine the
dependencies of your project and to determine all the available classes and functions.
It expects the composer.json to be in the root folder of your repository.
Are you sure this class is defined by one of your dependencies, or did you maybe
not list a dependency in either the require or require-dev section?
2. Missing use statement
PHP does not complain about undefined classes in ìnstanceof checks. For
example, the following PHP code will work perfectly fine:
if($xinstanceofDoesNotExist){// Do something.}
If you have not tested against this specific condition, such errors might go
unnoticed.
The method withUuid does not exist on object<Spatie\BinaryUuid\Builder>? Since you implemented __call, maybe consider adding a @method annotation.
If you implement __call and you know which methods are available, you
can improve IDE auto-completion and static analysis by adding a @method annotation to
the class.
This is often the case, when __call is implemented by a parent class and
only the child class knows which methods exist:
classParentClass{private$data=array();publicfunction__call($method,array$args){if(0===strpos($method,'get')){return$this->data[strtolower(substr($method,3))];}thrownew\LogicException(sprintf('Unsupported method: %s',$method));}}/** * If this class knows which fields exist, you can specify the methods here: * * @method string getName() */classSomeClassextendsParentClass{}
The method withUuid does not exist on object<Spatie\BinaryUuid\Builder>? Since you implemented __call, maybe consider adding a @method annotation.
If you implement __call and you know which methods are available, you
can improve IDE auto-completion and static analysis by adding a @method annotation to
the class.
This is often the case, when __call is implemented by a parent class and
only the child class knows which methods exist:
classParentClass{private$data=array();publicfunction__call($method,array$args){if(0===strpos($method,'get')){return$this->data[strtolower(substr($method,3))];}thrownew\LogicException(sprintf('Unsupported method: %s',$method));}}/** * If this class knows which fields exist, you can specify the methods here: * * @method string getName() */classSomeClassextendsParentClass{}
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.json
file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.json
to be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
require
orrequire-dev
section?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceof
checks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.