We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php  | 
            ||
| 31 | 5 | final class Factory  | 
            |
| 32 | { | 
            ||
| 33 | /**  | 
            ||
| 34 | 3 | * @var string[]  | 
            |
| 35 | */  | 
            ||
| 36 | 3 | private $namespaces;  | 
            |
| 37 | 3 | ||
| 38 | /**  | 
            ||
| 39 | 2 | * @var ReflectionClass[]  | 
            |
| 40 | */  | 
            ||
| 41 | 2 | private $reflections;  | 
            |
| 42 | 2 | ||
| 43 | /**  | 
            ||
| 44 | 6 | * @var Reader  | 
            |
| 45 | */  | 
            ||
| 46 | 6 | private $annotationReader;  | 
            |
| 47 | |||
| 48 | /**  | 
            ||
| 49 | * @var self  | 
            ||
| 50 | 6 | */  | 
            |
| 51 | 6 | private static $defaultInstance;  | 
            |
| 52 | 6 | ||
| 53 | 3 | /**  | 
            |
| 54 | * Initializes the rule with the defined namespaces.  | 
            ||
| 55 | *  | 
            ||
| 56 | 4 | * If the default namespace is not in the array, it will be add to the end  | 
            |
| 57 | 4 | * of the array.  | 
            |
| 58 | 1 | *  | 
            |
| 59 | * @param array $namespaces  | 
            ||
| 60 | */  | 
            ||
| 61 | 3 | public function __construct(array $namespaces = [])  | 
            |
| 73 | |||
| 74 | /**  | 
            ||
| 75 | * Defines the default instance of the factory.  | 
            ||
| 76 | *  | 
            ||
| 77 | * @param Factory $factory  | 
            ||
| 78 | */  | 
            ||
| 79 | public static function setDefaultInstance(self $factory)  | 
            ||
| 83 | |||
| 84 | /**  | 
            ||
| 85 | * Returns the default instance of the factory.  | 
            ||
| 86 | *  | 
            ||
| 87 | * @return self  | 
            ||
| 88 | */  | 
            ||
| 89 | public static function getDefaultInstance(): self  | 
            ||
| 97 | |||
| 98 | /**  | 
            ||
| 99 | * Returns a list of namespaces.  | 
            ||
| 100 | *  | 
            ||
| 101 | * @return array  | 
            ||
| 102 | */  | 
            ||
| 103 | public function getNamespaces(): array  | 
            ||
| 107 | |||
| 108 | /**  | 
            ||
| 109 | * Creates a rule based on its name with the defined arguments.  | 
            ||
| 110 | *  | 
            ||
| 111 | * @param string $ruleName  | 
            ||
| 112 | * @param array $arguments  | 
            ||
| 113 | *  | 
            ||
| 114 | * @throws ComponentException When the rule cannot be created  | 
            ||
| 115 | *  | 
            ||
| 116 | * @return Rule  | 
            ||
| 117 | */  | 
            ||
| 118 | public function rule(string $ruleName, array $arguments = []): Rule  | 
            ||
| 141 | |||
| 142 | public function message(Result $result): Message  | 
            ||
| 158 | |||
| 159 | public function exception(Result $result): ValidationException  | 
            ||
| 174 | |||
| 175 | private function chooseTemplate(Templates $templates, bool $isInverted, string $templateId): Template  | 
            ||
| 192 | |||
| 193 | private function getExceptionReflection(Rule $rule): ReflectionClass  | 
            ||
| 199 | |||
| 200 | /**  | 
            ||
| 201 | * Creates a ReflectionClass object based on a class name.  | 
            ||
| 202 | *  | 
            ||
| 203 | * This method always return the same object for a given class name in order  | 
            ||
| 204 | * to improve performance.  | 
            ||
| 205 | *  | 
            ||
| 206 | * @param string $className  | 
            ||
| 207 | *  | 
            ||
| 208 | * @return ReflectionClass  | 
            ||
| 209 | */  | 
            ||
| 210 | private function getReflection(string $className): ReflectionClass  | 
            ||
| 218 | }  | 
            ||
| 219 | 
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..