Skip to content

Commit

Permalink
Update README.md (#29)
Browse files Browse the repository at this point in the history
* Update README.md
* Refactor
  • Loading branch information
glorand authored Oct 15, 2019
1 parent ab9cd5c commit 79a2f0a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@
<a href="LICENSE.md">
<img src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat" alt="Software License">
</a>
<a href="https://github.styleci.io/repos/163381474">
<br />
<a href="https://github.styleci.io/repos/163381474">
<img src="https://github.styleci.io/repos/163381474/shield?branch=master" alt="StyleCI">
</a>
<a href="https://scrutinizer-ci.com/g/glorand/laravel-model-settings/">
<a href="https://codeclimate.com/github/glorand/laravel-model-settings/maintainability">
<img src="https://api.codeclimate.com/v1/badges/ea0941afe155dd14f5d8/maintainability" />
</a>
<a href="https://scrutinizer-ci.com/g/glorand/laravel-model-settings/">
<img src="https://scrutinizer-ci.com/g/glorand/laravel-model-settings/badges/quality-score.png?b=master" alt="Scrutinizer Code Quality">
</a>
<a href="https://scrutinizer-ci.com/g/glorand/laravel-model-settings/?branch=master">
Expand Down
10 changes: 5 additions & 5 deletions src/Traits/HasSettingsRedis.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public function getSettingsValue(): array
public function cacheKey(string $key = null): string
{
return sprintf(
"r-k-%s:%s:%s",
$this->getTable(),
$this->getKey(),
$this->updated_at->timestamp
) . $key;
"r-k-%s:%s:%s",
$this->getTable(),
$this->getKey(),
$this->updated_at->timestamp
) . $key;
}

abstract public function getTable();
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/HasSettingsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ private function __getSettingsValue(): array
{
if ($modelSettings = $this->modelSettings()->first()) {
return $modelSettings->settings;
} else {
return [];
}

return [];
}

/**
Expand Down

0 comments on commit 79a2f0a

Please sign in to comment.