Skip to content

Commit 2efcfe1

Browse files
committed
Even more phpstan cleanups
1 parent 08c5e10 commit 2efcfe1

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

LibreNMS/ComposerHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ private static function populateEnv()
134134
];
135135

136136
if (file_exists('config.php')) {
137+
/** @phpstan-ignore ignore.unmatched */
137138
/** @phpstan-ignore include.fileNotFound */
138139
@include 'config.php';
139140
}

LibreNMS/Model.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ abstract public function isValid();
174174
*/
175175
public static function onDelete($model)
176176
{
177-
if (\App::runningInConsole()) {
177+
if (app()->runningInConsole()) {
178178
echo '-';
179179
}
180180
}
@@ -184,7 +184,7 @@ public static function onDelete($model)
184184
*/
185185
public static function onCreate($model)
186186
{
187-
if (\App::runningInConsole()) {
187+
if (app()->runningInConsole()) {
188188
echo '+';
189189
}
190190
}
@@ -194,14 +194,14 @@ public static function onCreate($model)
194194
*/
195195
public static function onUpdate($model)
196196
{
197-
if (\App::runningInConsole()) {
197+
if (app()->runningInConsole()) {
198198
echo 'U';
199199
}
200200
}
201201

202202
public static function onNoUpdate()
203203
{
204-
if (\App::runningInConsole()) {
204+
if (app()->runningInConsole()) {
205205
echo '.';
206206
}
207207
}

LibreNMS/Util/ModuleTestHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ private function saveSnmprec(array $data, ?string $context = null, bool $write =
467467
}
468468

469469
// put data in the proper order for snmpsim
470-
uksort($results, [$this, 'compareOid']);
470+
uksort($results, $this->compareOid(...));
471471

472472
$output = implode(PHP_EOL, $results) . PHP_EOL;
473473

0 commit comments

Comments
 (0)