From 76b9bbfe8aad383a91c54f4356c51ec9ca9028fd Mon Sep 17 00:00:00 2001 From: Lonnie Ezell Date: Thu, 7 Mar 2024 23:29:48 -0600 Subject: [PATCH 1/3] fix(app): Fixes a typo in the ClearSettings command that was stopping execution --- src/Commands/ClearSettings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/ClearSettings.php b/src/Commands/ClearSettings.php index b31d547..5fc5024 100644 --- a/src/Commands/ClearSettings.php +++ b/src/Commands/ClearSettings.php @@ -17,7 +17,7 @@ public function run(array $params) return; } - service('setting')->flush(); + service('settings')->flush(); CLI::write('Settings cleared from the database.', 'green'); } From 55ee1f52d7385e0358a9ec8d994c4694cd4ec463 Mon Sep 17 00:00:00 2001 From: Lonnie Ezell Date: Fri, 8 Mar 2024 23:36:10 -0600 Subject: [PATCH 2/3] chore(app): style fixes --- src/Handlers/DatabaseHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handlers/DatabaseHandler.php b/src/Handlers/DatabaseHandler.php index 4fb488d..73b8f25 100644 --- a/src/Handlers/DatabaseHandler.php +++ b/src/Handlers/DatabaseHandler.php @@ -93,7 +93,7 @@ public function set(string $class, string $property, $value = null, ?string $con 'context' => $context, 'updated_at' => $time, ]); - // ...otherwise insert it + // ...otherwise insert it } else { $result = $this->builder ->insert([ From 1288475b388c75c27adc4c47bdf8e61765b9b87b Mon Sep 17 00:00:00 2001 From: Lonnie Ezell Date: Fri, 8 Mar 2024 23:39:01 -0600 Subject: [PATCH 3/3] chore(app): More style fixes with updated tools --- src/Config/Settings.php | 2 +- src/Handlers/DatabaseHandler.php | 4 ++-- src/Helpers/setting_helper.php | 2 +- src/Settings.php | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Config/Settings.php b/src/Config/Settings.php index a4695e3..e23c8cc 100644 --- a/src/Config/Settings.php +++ b/src/Config/Settings.php @@ -13,7 +13,7 @@ class Settings extends BaseConfig * match a public class var here with the * settings array containing 'class'. * - * @var string[] + * @var list */ public $handlers = ['database']; diff --git a/src/Handlers/DatabaseHandler.php b/src/Handlers/DatabaseHandler.php index 73b8f25..70322f3 100644 --- a/src/Handlers/DatabaseHandler.php +++ b/src/Handlers/DatabaseHandler.php @@ -27,7 +27,7 @@ class DatabaseHandler extends ArrayHandler /** * Array of contexts that have been stored. * - * @var null[]|string[] + * @var list|list */ private $hydrated = []; @@ -93,7 +93,7 @@ public function set(string $class, string $property, $value = null, ?string $con 'context' => $context, 'updated_at' => $time, ]); - // ...otherwise insert it + // ...otherwise insert it } else { $result = $this->builder ->insert([ diff --git a/src/Helpers/setting_helper.php b/src/Helpers/setting_helper.php index 9d67629..1282130 100644 --- a/src/Helpers/setting_helper.php +++ b/src/Helpers/setting_helper.php @@ -8,7 +8,7 @@ * * @param mixed $value * - * @return array|bool|float|int|object|Settings|string|void|null + * @return array|bool|float|int|object|Settings|string|void|null * @phpstan-return ($key is null ? Settings : ($value is null ? array|bool|float|int|object|string|null : void)) */ function setting(?string $key = null, $value = null) diff --git a/src/Settings.php b/src/Settings.php index 7df538f..da4bbe7 100644 --- a/src/Settings.php +++ b/src/Settings.php @@ -17,7 +17,7 @@ class Settings /** * An array of handlers for getting/setting the values. * - * @var BaseHandler[] + * @var list */ private array $handlers = []; @@ -117,7 +117,7 @@ public function flush() /** * Returns the handler that is set to store values. * - * @return BaseHandler[] + * @return list * * @throws RuntimeException */ @@ -141,7 +141,7 @@ private function getWriteHandlers() /** * Analyzes the given key and breaks it into the class.field parts. * - * @return string[] + * @return list * * @throws InvalidArgumentException */