diff options
Diffstat (limited to 'core/Command/SetupChecks.php')
-rw-r--r-- | core/Command/SetupChecks.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/core/Command/SetupChecks.php b/core/Command/SetupChecks.php index ca39948de4e..e6e54fbcf22 100644 --- a/core/Command/SetupChecks.php +++ b/core/Command/SetupChecks.php @@ -59,13 +59,11 @@ class SetupChecks extends Base { throw new \InvalidArgumentException("Invalid rich object, {$requiredField} field is missing"); } } - if ($parameter['type'] === 'user') { - $replacements[] = '@' . $parameter['name']; - } elseif ($parameter['type'] === 'file') { - $replacements[] = $parameter['path'] ?? $parameter['name']; - } else { - $replacements[] = $parameter['name']; - } + $replacements[] = match($parameter['type']) { + 'user' => '@' . $parameter['name'], + 'file' => $parameter['path'] ?? $parameter['name'], + default => $parameter['name'], + }; } return str_replace($placeholders, $replacements, $message); } |