Shorten overly long line in PackageInstallationNodeBuilder
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 18 Nov 2022 09:12:36 +0000 (10:12 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 18 Nov 2022 10:00:51 +0000 (11:00 +0100)
wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php

index 4aa4f60b999047aed852b96a2953b2e3a1a3c2b8..22ef62fd5b65aee424eba529f841153465b4b682 100644 (file)
@@ -616,7 +616,10 @@ class PackageInstallationNodeBuilder
         $pluginNodes = [];
 
         $this->emptyNode = true;
-        $instructions = ($this->installation->getAction() == 'install') ? $this->installation->getArchive()->getInstallInstructions() : $this->installation->getArchive()->getUpdateInstructions();
+        $instructions = match ($this->installation->getAction()) {
+            'install' => $this->installation->getArchive()->getInstallInstructions(),
+            'update' => $this->installation->getArchive()->getUpdateInstructions(),
+        };
         $count = \count($instructions);
 
         if ($count === 0) {