1 | <?php |
||
13 | class PropertyTypeLookup { |
||
14 | |||
15 | private $connection; |
||
16 | private $tableName; |
||
17 | |||
18 | /** |
||
19 | * This constructor is package private. Construction is done via EntityStoreFactory. |
||
20 | * |
||
21 | * @param Connection $connection |
||
22 | * @param string $tableName |
||
23 | */ |
||
24 | 4 | public function __construct( Connection $connection, $tableName ) { |
|
28 | |||
29 | /** |
||
30 | * @param PropertyId $id |
||
31 | * |
||
32 | * @return string|null |
||
33 | * @throws PropertyTypeLookupException |
||
34 | */ |
||
35 | 4 | public function getTypeOfProperty( PropertyId $id ) { |
|
47 | |||
48 | 4 | private function buildQuery( PropertyId $id ) { |
|
55 | |||
56 | 3 | private function getTypeFromResult( \Traversable $rows ) { |
|
65 | |||
66 | } |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.