@@ -36,8 +36,6 @@ |
||
36 | 36 | * Create a new ConfigurationRepositoryInterface instance. |
37 | 37 | * |
38 | 38 | * @param ConfigurationModel $model |
39 | - * @param Repository $config |
|
40 | - * @param FieldTypeCollection $fieldTypes |
|
41 | 39 | */ |
42 | 40 | public function __construct(ConfigurationModel $model) |
43 | 41 | { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function get($key, $scope) |
57 | 57 | { |
58 | - return $this->configurations->get($key . $scope); |
|
58 | + return $this->configurations->get($key.$scope); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | */ |
138 | 138 | public function purge($namespace) |
139 | 139 | { |
140 | - $this->model->where('key', 'LIKE', $namespace . '::%')->delete(); |
|
140 | + $this->model->where('key', 'LIKE', $namespace.'::%')->delete(); |
|
141 | 141 | |
142 | 142 | return $this; |
143 | 143 | } |
@@ -75,13 +75,13 @@ |
||
75 | 75 | */ |
76 | 76 | public function save(FormBuilder $builder) |
77 | 77 | { |
78 | - $namespace = $builder->getFormEntry() . '::'; |
|
78 | + $namespace = $builder->getFormEntry().'::'; |
|
79 | 79 | |
80 | 80 | /* @var FieldType $field */ |
81 | 81 | foreach ($builder->getFormFields() as $field) { |
82 | 82 | |
83 | 83 | $scope = $builder->getScope(); |
84 | - $key = $namespace . $field->getField(); |
|
84 | + $key = $namespace.$field->getField(); |
|
85 | 85 | $value = $builder->getFormValue($field->getInputName()); |
86 | 86 | |
87 | 87 | $this->configurations->set($key, $scope, $value); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | { |
24 | 24 | /* @var ConfigurationInterface $item */ |
25 | 25 | foreach ($items as $item) { |
26 | - $this->items[$item->getKey() . $item->getScope()] = $item; |
|
26 | + $this->items[$item->getKey().$item->getScope()] = $item; |
|
27 | 27 | } |
28 | 28 | } |
29 | 29 | } |
@@ -39,17 +39,17 @@ discard block |
||
39 | 39 | public function handle(ConfigurationFormBuilder $builder, ConfigurationRepositoryInterface $configuration) |
40 | 40 | { |
41 | 41 | $scope = $builder->getScope(); |
42 | - $namespace = $builder->getFormEntry() . '::'; |
|
42 | + $namespace = $builder->getFormEntry().'::'; |
|
43 | 43 | |
44 | 44 | /* |
45 | 45 | * Get the fields from the config system. Sections are |
46 | 46 | * optionally defined the same way. |
47 | 47 | */ |
48 | - if (!$fields = $this->config->get($namespace . 'configuration/configuration')) { |
|
49 | - $fields = $fields = $this->config->get($namespace . 'configuration', []); |
|
48 | + if (!$fields = $this->config->get($namespace.'configuration/configuration')) { |
|
49 | + $fields = $fields = $this->config->get($namespace.'configuration', []); |
|
50 | 50 | } |
51 | 51 | |
52 | - if ($sections = $this->config->get($namespace . 'configuration/sections')) { |
|
52 | + if ($sections = $this->config->get($namespace.'configuration/sections')) { |
|
53 | 53 | $builder->setSections($sections); |
54 | 54 | } |
55 | 55 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $label = array_get( |
79 | 79 | $field, |
80 | 80 | 'label', |
81 | - $namespace . 'configuration.' . $slug . '.label' |
|
81 | + $namespace.'configuration.'.$slug.'.label' |
|
82 | 82 | ) |
83 | 83 | ) |
84 | 84 | ) { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $field['label'] = array_get( |
90 | 90 | $field, |
91 | 91 | 'label', |
92 | - $namespace . 'configuration.' . $slug . '.name' |
|
92 | + $namespace.'configuration.'.$slug.'.name' |
|
93 | 93 | ); |
94 | 94 | |
95 | 95 | // Default the warning. |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $warning = array_get( |
98 | 98 | $field, |
99 | 99 | 'warning', |
100 | - $namespace . 'configuration.' . $slug . '.warning' |
|
100 | + $namespace.'configuration.'.$slug.'.warning' |
|
101 | 101 | ) |
102 | 102 | ) |
103 | 103 | ) { |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $field['config']['placeholder'] = array_get( |
109 | 109 | $field, |
110 | 110 | 'placeholder', |
111 | - $namespace . 'configuration.' . $slug . '.placeholder' |
|
111 | + $namespace.'configuration.'.$slug.'.placeholder' |
|
112 | 112 | ); |
113 | 113 | |
114 | 114 | // Default the instructions. |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $instructions = array_get( |
117 | 117 | $field, |
118 | 118 | 'instructions', |
119 | - $namespace . 'configuration.' . $slug . '.instructions' |
|
119 | + $namespace.'configuration.'.$slug.'.instructions' |
|
120 | 120 | ) |
121 | 121 | ) |
122 | 122 | ) { |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | // Get the value defaulting to the default value. |
127 | - if ($applied = $configuration->get($namespace . $slug, $scope)) { |
|
127 | + if ($applied = $configuration->get($namespace.$slug, $scope)) { |
|
128 | 128 | $field['value'] = $applied->getValue(); |
129 | 129 | } else { |
130 | 130 | $field['value'] = array_get($field['config'], 'default_value'); |