Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnabil230 authored and github-actions[bot] committed Jul 22, 2022
1 parent 013de39 commit 33ac980
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 13 deletions.
1 change: 0 additions & 1 deletion config/setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use MichaelNabil230\Setting\Models\Setting;


return [
/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/GetSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private function print($settings)
$settings
);

$this->info('Values found ' . $settings->count());
$this->info('Values found '.$settings->count());

return Command::SUCCESS;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/SetOrUpdateSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public function handle()
$settings = setting()->set($key, $value)->save();

if (Arr::has($settings, $key)) {
$this->info('Insert ' . $key . ' into a new setting successfully.');
$this->info('Insert '.$key.' into a new setting successfully.');
} else {
$this->info('Updated ' . $key . ' setting successfully.');
$this->info('Updated '.$key.' setting successfully.');
}

return Command::SUCCESS;
Expand Down
1 change: 0 additions & 1 deletion src/Facades/Setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*
* @see \MichaelNabil230\Setting\SettingManager
*/

class Setting extends Facade
{
protected static function getFacadeAccessor()
Expand Down
4 changes: 2 additions & 2 deletions src/Stores/AbstractStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function get($key, $default = null): mixed
{
$this->loadedData();

$default = $default ?? config('setting.defaults.' . $key);
$default = $default ?? config('setting.defaults.'.$key);

return Arr::get($this->data, $key, $default);
}
Expand Down Expand Up @@ -142,7 +142,7 @@ public function all(): array
*/
public function flip($key): self
{
return $this->set($key, !$this->get($key));
return $this->set($key, ! $this->get($key));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Stores/DatabaseSettingStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function forget($key): bool
{
$this->loadedData();

if (!Arr::has($this->data, $key)) {
if (! Arr::has($this->data, $key)) {
return false;
}

Expand Down Expand Up @@ -166,7 +166,7 @@ public function setExtraColumns(array $columns): self
*/
private function syncDeleted(array $deleted): void
{
if (!empty($deleted)) {
if (! empty($deleted)) {
$this->model::whereIn('key', $deleted)->delete();
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/Stores/JsonSettingStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function forget($key): bool
{
$this->loadedData();

if (!Arr::has($this->data, $key)) {
if (! Arr::has($this->data, $key)) {
return false;
}

Expand Down Expand Up @@ -115,14 +115,14 @@ private function throwAnyException(): void
$files = $this->files;

// If the file does not already exist, we will attempt to create it.
if (!$files->exists($path)) {
if (! $files->exists($path)) {
$result = $files->put($path, '{}');
if ($result === false) {
throw new InvalidArgumentException("Could not write to $path.");
}
}

if (!$files->isWritable($path)) {
if (! $files->isWritable($path)) {
throw new InvalidArgumentException("$path is not writable.");
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Stores/RedisSettingStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function forget($key): bool
{
$this->loadedData();

if (!Arr::has($this->data, $key)) {
if (! Arr::has($this->data, $key)) {
return false;
}

Expand Down

0 comments on commit 33ac980

Please sign in to comment.