Merge "Simplify a few list() that only care about the first element"
[lhc/web/wiklou.git] / includes / shell / FirejailCommand.php
index d818930..6bf94cd 100644 (file)
@@ -51,7 +51,7 @@ class FirejailCommand extends Command {
        /**
         * @inheritDoc
         */
-       public function whitelistPaths( array $paths ) {
+       public function whitelistPaths( array $paths ): Command {
                $this->whitelistedPaths = array_merge( $this->whitelistedPaths, $paths );
                return $this;
        }
@@ -65,7 +65,7 @@ class FirejailCommand extends Command {
                        $splitCommand = explode( ' ', $command, 2 );
                        $this->logger->debug(
                                "firejail: Command {$splitCommand[0]} {params} has no restrictions",
-                               [ 'params' => isset( $splitCommand[1] ) ? $splitCommand[1] : '' ]
+                               [ 'params' => $splitCommand[1] ?? '' ]
                        );
                        return parent::buildFinalCommand( $command );
                }