1 | <?php |
||
12 | class App extends ActiveModel |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * Get all objects with query caching |
||
17 | * @return \Illuminate\Database\Eloquent\Collection|static |
||
18 | * @throws SyntaxException |
||
19 | */ |
||
20 | public static function getAll() |
||
35 | |||
36 | /** |
||
37 | * Get all object by defined $type with caching query in memory |
||
38 | * @param $type |
||
39 | * @return array|null |
||
40 | * @throws SyntaxException |
||
41 | */ |
||
42 | public static function getAllByType($type) |
||
53 | |||
54 | /** |
||
55 | * Get single row by defined type and sys_name with query caching |
||
56 | * @param string $type |
||
57 | * @param string $sys_name |
||
58 | * @return mixed|null |
||
59 | * @throws SyntaxException |
||
60 | */ |
||
61 | public static function getItem($type, $sys_name) |
||
71 | |||
72 | /** |
||
73 | * Get application configs |
||
74 | * @param string $type |
||
75 | * @param string $name |
||
76 | * @return array|null|string |
||
77 | * @throws SyntaxException |
||
78 | */ |
||
79 | public static function getConfigs($type, $name) |
||
89 | |||
90 | /** |
||
91 | * Get localized application name |
||
92 | * @return string |
||
93 | * @throws SyntaxException |
||
94 | */ |
||
95 | public function getLocaleName() |
||
109 | |||
110 | /** |
||
111 | * Check if app version match db version of this app |
||
112 | * @return bool |
||
113 | * @throws SyntaxException |
||
114 | */ |
||
115 | public function checkVersion() |
||
132 | |||
133 | } |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.