1 | <?php |
||
25 | class App extends ActiveModel |
||
26 | { |
||
27 | /** |
||
28 | * Get all objects with query caching |
||
29 | * @return \Illuminate\Database\Eloquent\Collection|static |
||
30 | * @throws SyntaxException |
||
31 | */ |
||
32 | public static function getAll() |
||
47 | |||
48 | /** |
||
49 | * Get all object by defined $type with caching query in memory |
||
50 | * @param $type |
||
51 | * @return array|null |
||
52 | * @throws SyntaxException |
||
53 | */ |
||
54 | public static function getAllByType($type) |
||
65 | |||
66 | /** |
||
67 | * Get single row by defined type and sys_name with query caching |
||
68 | * @param string $type |
||
69 | * @param string $sys_name |
||
70 | * @return mixed|null |
||
71 | * @throws SyntaxException |
||
72 | */ |
||
73 | public static function getItem($type, $sys_name) |
||
83 | |||
84 | /** |
||
85 | * Get application configs |
||
86 | * @param string $type |
||
87 | * @param string $name |
||
88 | * @return array|null|string |
||
89 | * @throws SyntaxException |
||
90 | */ |
||
91 | public static function getConfigs($type, $name) |
||
101 | |||
102 | /** |
||
103 | * Get single config value by ext type, ext name and config key |
||
104 | * @param string $type |
||
105 | * @param string $name |
||
106 | * @param string $configKey |
||
107 | * @return null |
||
108 | */ |
||
109 | public static function getConfig($type, $name, $configKey) |
||
118 | |||
119 | /** |
||
120 | * Get localized application name |
||
121 | * @return string |
||
122 | * @throws SyntaxException |
||
123 | */ |
||
124 | public function getLocaleName() |
||
138 | |||
139 | /** |
||
140 | * Check if app version match db version of this app |
||
141 | * @return bool |
||
142 | * @throws SyntaxException |
||
143 | */ |
||
144 | public function checkVersion() |
||
154 | |||
155 | /** |
||
156 | * Get extension script version if exists |
||
157 | * @return bool|float |
||
158 | */ |
||
159 | public function getScriptVersion() |
||
172 | |||
173 | } |
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.