@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | |
36 | 36 | public function getSettings(Group $group, array $settings, ModuleInstance $moduleInstance) |
37 | 37 | { |
38 | - if(Cache::has($this->getCacheKey($group, $moduleInstance))) { |
|
38 | + if (Cache::has($this->getCacheKey($group, $moduleInstance))) { |
|
39 | 39 | return Cache::get($this->getCacheKey($group, $moduleInstance)); |
40 | 40 | } |
41 | - foreach ((array_key_exists('required', $settings)?$settings['required']:[]) as $setting) { |
|
41 | + foreach ((array_key_exists('required', $settings) ? $settings['required'] : []) as $setting) { |
|
42 | 42 | if ($this->groupIsForSetting($group, $setting)) { |
43 | 43 | Cache::put($this->getCacheKey($group, $moduleInstance), $setting['required'], 7200); |
44 | 44 | return $setting['required']; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | protected function getCacheKey(Group $group, ModuleInstance $moduleInstance) |
51 | 51 | { |
52 | - return RequiredSettingRetrieval::class . '.' . $moduleInstance->id() . '.' . $group->id(); |
|
52 | + return RequiredSettingRetrieval::class.'.'.$moduleInstance->id().'.'.$group->id(); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | protected function groupIsForSetting(Group $group, array $setting): bool |
@@ -65,10 +65,10 @@ |
||
65 | 65 | protected function getCacheKey(Group $group) |
66 | 66 | { |
67 | 67 | $moduleInstance = app(ModuleInstance::class); |
68 | - if($moduleInstance->exists) { |
|
69 | - throw new \Exception('Module instance was used in ' . static::class . ' but was not bound to the container'); |
|
68 | + if ($moduleInstance->exists) { |
|
69 | + throw new \Exception('Module instance was used in '.static::class.' but was not bound to the container'); |
|
70 | 70 | } |
71 | - return PositionSettingRetrieval::class . '.' . $moduleInstance->id() . '.' . $group->id(); |
|
71 | + return PositionSettingRetrieval::class.'.'.$moduleInstance->id().'.'.$group->id(); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | public function parse($setting) |