From da46f689dd8120b9f2c92706cbbf0ef3a74525c1 Mon Sep 17 00:00:00 2001 From: Lorand Gombos Date: Sat, 13 Nov 2021 00:41:02 +0200 Subject: [PATCH] Updates (#95) * Updates * update changelog --- CHANGELOG.md | 4 ++++ src/Managers/TableSettingsManager.php | 3 ++- src/Traits/HasSettings.php | 3 ++- src/Traits/HasSettingsField.php | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13b775e..6848505 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `glorand/laravel-model-settings` will be documented in this file +## 4.4.1 - 2021-11-13 +### Fix +- fix validation variable name + ## 4.4.0 - 2021-11-01 ### Added - Validation system for settings data diff --git a/src/Managers/TableSettingsManager.php b/src/Managers/TableSettingsManager.php index a67dd5a..74ca1a6 100644 --- a/src/Managers/TableSettingsManager.php +++ b/src/Managers/TableSettingsManager.php @@ -13,9 +13,10 @@ class TableSettingsManager extends AbstractSettingsManager { /** - * @param array $settings + * @param array $settings * @return \Glorand\Model\Settings\Contracts\SettingsManagerContract * @throws \Exception + * @SuppressWarnings(PHPMD.ElseExpression) */ public function apply(array $settings = []): SettingsManagerContract { diff --git a/src/Traits/HasSettings.php b/src/Traits/HasSettings.php index 466fe64..5a305f8 100644 --- a/src/Traits/HasSettings.php +++ b/src/Traits/HasSettings.php @@ -6,8 +6,9 @@ use Illuminate\Support\Arr; /** - * @property array $settingRules + * @property array $settingsRules * @property array $defaultSettings + * @SuppressWarnings(PHPMD.StaticAccess) */ trait HasSettings { diff --git a/src/Traits/HasSettingsField.php b/src/Traits/HasSettingsField.php index 0487d65..503865e 100644 --- a/src/Traits/HasSettingsField.php +++ b/src/Traits/HasSettingsField.php @@ -105,7 +105,7 @@ public function setPersistSettings(bool $val = true) */ private function hasSettingsField() { - return cache::remember( + return Cache::remember( config('model_settings.settings_table_cache_prefix') . '::has_field', now()->addDays(1), function () {