From 40f4d66f1e201971c7af1aadb855eaa6dcc09512 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Thu, 2 Mar 2023 21:00:53 +0100 Subject: [PATCH] CS fixes --- Blacklight/TmuxOutput.php | 3 --- Blacklight/libraries/Forking.php | 7 ++---- app/Extensions/helper/helpers.php | 1 - .../plugins/modifier.phpdate_format.php | 22 +++++++++---------- 4 files changed, 13 insertions(+), 20 deletions(-) diff --git a/Blacklight/TmuxOutput.php b/Blacklight/TmuxOutput.php index 9dd5d7250..e17ee0c94 100755 --- a/Blacklight/TmuxOutput.php +++ b/Blacklight/TmuxOutput.php @@ -103,9 +103,6 @@ class TmuxOutput extends Tmux ]; } - /** - * @return string - */ protected function _getHeader(): string { $buffer = ''; diff --git a/Blacklight/libraries/Forking.php b/Blacklight/libraries/Forking.php index 93662ff1c..876080be2 100755 --- a/Blacklight/libraries/Forking.php +++ b/Blacklight/libraries/Forking.php @@ -12,10 +12,10 @@ use Blacklight\processing\PostProcess; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Log; -use Symfony\Component\Process\Process; use Opis\Closure\SerializableClosure; use Spatie\Async\Output\SerializableException; use Spatie\Async\Pool; +use Symfony\Component\Process\Process; /** * Class Forking. @@ -910,10 +910,6 @@ class Forking //////////////////////////////////////////// Various methods /////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * @param string $command - * @return string - */ protected function _executeCommand(string $command): string { $process = Process::fromShellCommandline($command); @@ -923,6 +919,7 @@ class Forking echo $buffer; } }); + return $process->getOutput(); } diff --git a/app/Extensions/helper/helpers.php b/app/Extensions/helper/helpers.php index d853e450c..7e57eafb1 100644 --- a/app/Extensions/helper/helpers.php +++ b/app/Extensions/helper/helpers.php @@ -126,7 +126,6 @@ if (! function_exists('getUserBrowseOrder')) { } if (! function_exists('getUserBrowseOrdering')) { - function getUserBrowseOrdering(): array { return [ diff --git a/resources/smarty/plugins/modifier.phpdate_format.php b/resources/smarty/plugins/modifier.phpdate_format.php index a2f6c8822..aad198338 100755 --- a/resources/smarty/plugins/modifier.phpdate_format.php +++ b/resources/smarty/plugins/modifier.phpdate_format.php @@ -68,27 +68,27 @@ function smarty_modifier_phpdate_format($string, $format = 'Y/m/d H:i:s', $defau if (substr($format, 0, 5) == 'DATE_') { switch ($format) { case 'DATE_ATOM': $nformat = DATE_ATOM; - break; + break; case 'DATE_COOKIE': $nformat = DATE_COOKIE; - break; + break; case 'DATE_ISO8601': $nformat = DATE_ISO8601; - break; + break; case 'DATE_RFC822': $nformat = 'D, d M y H:i:s O'; - break; //The php constant is not quite right - as the time-zone comes out with invalid values like "UTC"... + break; //The php constant is not quite right - as the time-zone comes out with invalid values like "UTC"... case 'DATE_RFC850': $nformat = DATE_RFC850; - break; + break; case 'DATE_RFC1036': $nformat = DATE_RFC1036; - break; + break; case 'DATE_RFC1123': $nformat = DATE_RFC1123; - break; + break; case 'DATE_RFC2822': $nformat = DATE_RFC2822; - break; + break; case 'DATE_RFC3339': $nformat = DATE_RFC3339; - break; + break; case 'DATE_RSS': $nformat = 'D, d M Y H:i:s O'; - break; //as rfc822 ... + break; //as rfc822 ... case 'DATE_W3C': $nformat = DATE_W3C; - break; + break; } } else { $nformat = $format;