1 | <?php |
||
18 | class TypeChecker |
||
19 | { |
||
20 | /** |
||
21 | * Check if value belongs to internal Mongo type, converted by driver to scalars |
||
22 | * |
||
23 | * @param mixed $value |
||
24 | * @return bool |
||
25 | */ |
||
26 | public static function isInternalType($value) |
||
57 | |||
58 | /** |
||
59 | * @param mixed $value |
||
60 | * @return bool |
||
61 | */ |
||
62 | public static function isRegex($value) |
||
75 | |||
76 | /** |
||
77 | * @param mixed $value |
||
78 | * @return bool |
||
79 | */ |
||
80 | public static function isExpression($value) |
||
84 | |||
85 | /** |
||
86 | * Check if php array is hash map |
||
87 | * |
||
88 | * @param mixed $value |
||
89 | * |
||
90 | * @return bool |
||
91 | */ |
||
92 | public static function isHashMap($value) |
||
96 | } |
||
97 |
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.