A free open source IT asset/license management system
Get rid of 'setCode' and just use the constructor parameter instead
Brady Wetherington283a8851961a
diff --git a/app/Models/SnipeSCIMConfig.php b/app/Models/SnipeSCIMConfig.phpindex 0b5718ecd8..0499482c5b 100644--- a/app/Models/SnipeSCIMConfig.php+++ b/app/Models/SnipeSCIMConfig.php@@ -302,11 +302,11 @@ class SnipeSCIMConfig// addresses[type eq "work"]$matches = null;if (!preg_match('/^.+\[type eq "([a-zA-Z]+)"](?:\.([a-zA-Z]+))?$/', (string)$path, $matches)) {- throw new SCIMException("Unknown path type '$path'")->setCode(422);+ throw new SCIMException("Unknown path type '$path'", 422);}$type = $matches[1];if ($type != 'work') {- throw new SCIMException("Unknown object type '$type'")->setCode(422);+ throw new SCIMException("Unknown object type '$type'", 422);}$attribute = array_key_exists(2, $matches) ? $matches[2] : null;if (array_key_exists($attribute, self::$addressmap)) {@@ -315,7 +315,7 @@ class SnipeSCIMConfig}- throw new SCIMException("Could not handle path for update $path")->setCode(422);+ throw new SCIMException("Could not handle path for update $path", 422);}}