1 | <?php |
||
26 | class App extends ActiveModel |
||
27 | { |
||
28 | /** |
||
29 | * Get all objects with query caching |
||
30 | * @param $columns array |
||
31 | * @return \Illuminate\Database\Eloquent\Collection |
||
32 | * @throws SyntaxException |
||
33 | */ |
||
34 | public static function all($columns = ['*']) |
||
48 | |||
49 | /** |
||
50 | * @deprecated |
||
51 | * @return \Illuminate\Database\Eloquent\Collection|mixed |
||
52 | * @throws SyntaxException |
||
53 | */ |
||
54 | public static function getAll() |
||
58 | |||
59 | /** |
||
60 | * Get all object by defined $type with caching query in memory |
||
61 | * @param $type |
||
62 | * @return array|null |
||
63 | * @throws SyntaxException |
||
64 | */ |
||
65 | public static function getAllByType($type) |
||
76 | |||
77 | /** |
||
78 | * Get single row by defined type and sys_name with query caching |
||
79 | * @param string $type |
||
80 | * @param string|array $sys_name |
||
81 | * @return mixed|null |
||
82 | * @throws SyntaxException |
||
83 | */ |
||
84 | public static function getItem($type, $sys_name) |
||
98 | |||
99 | /** |
||
100 | * Get application configs |
||
101 | * @param string $type |
||
102 | * @param string $name |
||
103 | * @return array|null|string |
||
104 | * @throws SyntaxException |
||
105 | */ |
||
106 | public static function getConfigs($type, $name) |
||
116 | |||
117 | /** |
||
118 | * Get single config value by ext type, ext name and config key |
||
119 | * @param string $type |
||
120 | * @param string $name |
||
121 | * @param string $configKey |
||
122 | * @return null |
||
123 | */ |
||
124 | public static function getConfig($type, $name, $configKey) |
||
133 | |||
134 | /** |
||
135 | * Get localized application name |
||
136 | * @return string |
||
137 | * @throws SyntaxException |
||
138 | */ |
||
139 | public function getLocaleName() |
||
153 | |||
154 | /** |
||
155 | * Check if app version match db version of this app |
||
156 | * @return bool |
||
157 | * @throws SyntaxException |
||
158 | */ |
||
159 | public function checkVersion() |
||
169 | |||
170 | /** |
||
171 | * Get extension script version if exists |
||
172 | * @return bool|float |
||
173 | */ |
||
174 | public function getScriptVersion() |
||
187 | |||
188 | } |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.