From bccb206369040ea3628e3582ce478611ee2dcf8f Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Tue, 2 Jun 2020 17:47:53 -0500 Subject: [PATCH] formatting pass --- core/basepage.php | 3 +-- core/util.php | 13 ++++++------- ext/cron_uploader/theme.php | 2 +- ext/trash/info.php | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/core/basepage.php b/core/basepage.php index f8827ae9..d741062b 100644 --- a/core/basepage.php +++ b/core/basepage.php @@ -259,7 +259,6 @@ class BasePage public function flush_output(): void { - } /** @@ -267,7 +266,7 @@ class BasePage */ public function display(): void { - if($this->mode!=PageMode::MANUAL) { + if ($this->mode!=PageMode::MANUAL) { $this->send_headers(); } diff --git a/core/util.php b/core/util.php index b2f24ce6..55c1e148 100644 --- a/core/util.php +++ b/core/util.php @@ -409,15 +409,15 @@ function remove_empty_dirs(string $dir): bool ), ['..', '.'] ); - foreach($items as $item) { + foreach ($items as $item) { $path = join_path($dir, $item); - if(is_dir($path)) { + if (is_dir($path)) { $result = $result && remove_empty_dirs($path); } else { $result = false; } } - if($result===true) { + if ($result===true) { $result = $result && rmdir($dir); } return $result; @@ -426,7 +426,6 @@ function remove_empty_dirs(string $dir): bool function get_files_recursively(string $dir): array { - assert(!empty($dir)); if (!is_dir($dir)) { @@ -443,9 +442,9 @@ function get_files_recursively(string $dir): array $output = []; - foreach($things as $thing) { - $path = join_path($dir,$thing); - if(is_file($path)) { + foreach ($things as $thing) { + $path = join_path($dir, $thing); + if (is_file($path)) { $output[] = $path; } else { $output = array_merge($output, get_files_recursively($path)); diff --git a/ext/cron_uploader/theme.php b/ext/cron_uploader/theme.php index b2991b4f..e3a1a43c 100644 --- a/ext/cron_uploader/theme.php +++ b/ext/cron_uploader/theme.php @@ -74,7 +74,7 @@ class CronUploaderTheme extends Themelet diff --git a/ext/trash/info.php b/ext/trash/info.php index 2223562b..d7daf35a 100644 --- a/ext/trash/info.php +++ b/ext/trash/info.php @@ -8,5 +8,5 @@ class TrashInfo extends ExtensionInfo public $name = "Trash"; public $authors = ["Matthew Barbour"=>"matthew@darkholme.net"]; public $license = self::LICENSE_WTFPL; - public $description = "Provides \"Trash\" or \"Recycle Bin\"-type functionality, storing delete images for later recovery"; + public $description = "Provides \"Trash\" or \"Recycle Bin\"-type functionality, storing deleted images for later recovery"; }