Skip to content

Commit

Permalink
Merge pull request #123 from codeigniter4/command-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnieezell authored Mar 9, 2024
2 parents f23f501 + 1288475 commit 29d0c0c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Commands/ClearSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function run(array $params)
return;
}

service('setting')->flush();
service('settings')->flush();

CLI::write('Settings cleared from the database.', 'green');
}
Expand Down
2 changes: 1 addition & 1 deletion src/Config/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Settings extends BaseConfig
* match a public class var here with the
* settings array containing 'class'.
*
* @var string[]
* @var list<string>
*/
public $handlers = ['database'];

Expand Down
2 changes: 1 addition & 1 deletion src/Handlers/DatabaseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DatabaseHandler extends ArrayHandler
/**
* Array of contexts that have been stored.
*
* @var null[]|string[]
* @var list<null>|list<string>
*/
private $hydrated = [];

Expand Down
2 changes: 1 addition & 1 deletion src/Helpers/setting_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Settings
/**
* An array of handlers for getting/setting the values.
*
* @var BaseHandler[]
* @var list<BaseHandler>
*/
private array $handlers = [];

Expand Down Expand Up @@ -117,7 +117,7 @@ public function flush()
/**
* Returns the handler that is set to store values.
*
* @return BaseHandler[]
* @return list<BaseHandler>
*
* @throws RuntimeException
*/
Expand All @@ -141,7 +141,7 @@ private function getWriteHandlers()
/**
* Analyzes the given key and breaks it into the class.field parts.
*
* @return string[]
* @return list<string>
*
* @throws InvalidArgumentException
*/
Expand Down

0 comments on commit 29d0c0c

Please sign in to comment.