Skip to content

A free open source IT asset/license management system

Updated baseline

snipe4e813de9f9ca
diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php
index b9f52bc436..32c0cad539 100644
--- a/app/Http/Controllers/SettingsController.php
+++ b/app/Http/Controllers/SettingsController.php
@@ -1338,7 +1338,7 @@ class SettingsController extends Controller
}
$adapter = $instance->adapter();
- if ($adapter === null || ! $adapter instanceof \App\SyncAdapters\SyncAdapter) {
+ if ($adapter === null) {
abort(404);
}
@@ -1389,7 +1389,7 @@ class SettingsController extends Controller
}
$adapter = $instance->adapter();
- if ($adapter === null || ! $adapter instanceof \App\SyncAdapters\SyncAdapter) {
+ if ($adapter === null) {
abort(404);
}
diff --git a/app/SyncAdapters/SyncAdapter.php b/app/SyncAdapters/SyncAdapter.php
index a8a15ba8a2..2623050082 100644
--- a/app/SyncAdapters/SyncAdapter.php
+++ b/app/SyncAdapters/SyncAdapter.php
@@ -94,7 +94,7 @@ abstract class SyncAdapter
* Returns null when the instance's adapter_type doesn't match any
* discovered class (e.g. an old row for a removed adapter).
*/
- public static function factory(SyncAdapterInstance $instance): ?static
+ public static function factory(SyncAdapterInstance $instance): ?self
{
$types = self::allTypes();
$class = $types[$instance->adapter_type] ?? null;
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index 6b85178481..0912de2e20 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -9733,40 +9733,40 @@ parameters:
path: app/Services/Saml.php
-
- message: '#^Strict comparison using \=\=\= between non\-empty\-string and null will always evaluate to false\.$#'
- identifier: identical.alwaysFalse
+ message: '#^Using nullsafe property access "\?\-\>name" on left side of \?\? is unnecessary\. Use \-\> instead\.$#'
+ identifier: nullsafe.neverNull
count: 1
- path: app/SyncAdapters/MerakiSystemsManager/MerakiClient.php
+ path: app/SyncAdapters/MappingTargets.php
-
- message: '#^Using nullsafe property access "\?\-\>name" on left side of \?\? is unnecessary\. Use \-\> instead\.$#'
- identifier: nullsafe.neverNull
+ message: '#^Strict comparison using \=\=\= between non\-empty\-string and null will always evaluate to false\.$#'
+ identifier: identical.alwaysFalse
count: 1
- path: app/SyncAdapters/Support/MappingTargets.php
+ path: app/SyncAdapters/MerakiSystemsManager/MerakiClient.php
-
message: '#^Using nullsafe property access "\?\-\>email" on left side of \?\? is unnecessary\. Use \-\> instead\.$#'
identifier: nullsafe.neverNull
count: 1
- path: app/SyncAdapters/Support/NotesComposer.php
+ path: app/SyncAdapters/NotesComposer.php
-
message: '#^Using nullsafe property access "\?\-\>model_number" on left side of \?\? is unnecessary\. Use \-\> instead\.$#'
identifier: nullsafe.neverNull
count: 1
- path: app/SyncAdapters/Support/NotesComposer.php
+ path: app/SyncAdapters/NotesComposer.php
-
message: '#^Using nullsafe property access "\?\-\>name" on left side of \?\? is unnecessary\. Use \-\> instead\.$#'
identifier: nullsafe.neverNull
count: 7
- path: app/SyncAdapters/Support/NotesComposer.php
+ path: app/SyncAdapters/NotesComposer.php
-
message: '#^Using nullsafe property access "\?\-\>username" on left side of \?\? is unnecessary\. Use \-\> instead\.$#'
identifier: nullsafe.neverNull
count: 1
- path: app/SyncAdapters/Support/NotesComposer.php
+ path: app/SyncAdapters/NotesComposer.php
-
message: '#^Access to an undefined property App\\Models\\Actionlog\:\:\$created_by\.$#'