| Conditions | 5 | 
| Paths | 1 | 
| Total Lines | 22 | 
| Code Lines | 14 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 30 | public function read(array $annotationInfoList) | ||
| 31 |     {
 | ||
| 32 |         $func = function ($queryKey, $xpath) use ($annotationInfoList) {
 | ||
| 33 | $query = null; | ||
| 34 |             foreach ($annotationInfoList as $annotationInfo) {
 | ||
| 35 | $xmlObjects = $annotationInfo[$queryKey]; | ||
| 36 |                 foreach ($xmlObjects as $xmlObject) {
 | ||
| 37 | $xmlElement = $xmlObject->xpath($xpath); | ||
| 38 |                     if (!empty($xmlElement)) {
 | ||
| 39 | $query = ["sql" => trim($xmlElement[0]->__toString()), "method" => $xmlElement[0]->getName()]; | ||
| 40 | $entity = $xmlElement[0]->attributes()["entity"]; | ||
| 41 | $query["entity"] = $entity !== null ? $entity->__toString() : null; | ||
| 42 | break; | ||
| 43 | } | ||
| 44 | } | ||
| 45 | } | ||
| 46 | |||
| 47 | return $query; | ||
| 48 | }; | ||
| 49 | |||
| 50 |         $this->annotationInfo = function ($queryKey, $xpath) use ($func) {
 | ||
|  | |||
| 51 | return $func($queryKey, $xpath); | ||
| 52 | }; | ||
| 55 | 
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..