@@ -140,13 +140,13 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | foreach ($paths as $path) { |
143 | - // Get default value |
|
144 | - $defaultValue = null; |
|
145 | - if(is_array($default)){ |
|
146 | - $defaultValue = Arr::get($default, $path); |
|
147 | - }else{ |
|
148 | - $defaultValue = $default; |
|
149 | - } |
|
143 | + // Get default value |
|
144 | + $defaultValue = null; |
|
145 | + if(is_array($default)){ |
|
146 | + $defaultValue = Arr::get($default, $path); |
|
147 | + }else{ |
|
148 | + $defaultValue = $default; |
|
149 | + } |
|
150 | 150 | Arr::set($array, $path, Arr::get($allFlattened, $path, $defaultValue)); |
151 | 151 | } |
152 | 152 | |
@@ -172,29 +172,29 @@ discard block |
||
172 | 172 | return $this->apply($settings); |
173 | 173 | } |
174 | 174 | |
175 | - /** |
|
176 | - * |
|
177 | - */ |
|
175 | + /** |
|
176 | + * |
|
177 | + */ |
|
178 | 178 | protected function forgetEmpty(&$settings, $path) { |
179 | - // Forget path if it is empty |
|
180 | - if(!Arr::get($settings, $path)){ |
|
181 | - Arr::forget($settings, $path); |
|
182 | - }else{ |
|
183 | - return; |
|
184 | - } |
|
179 | + // Forget path if it is empty |
|
180 | + if(!Arr::get($settings, $path)){ |
|
181 | + Arr::forget($settings, $path); |
|
182 | + }else{ |
|
183 | + return; |
|
184 | + } |
|
185 | 185 | |
186 | - // Get path as array |
|
187 | - $paths = explode('.', $path); |
|
186 | + // Get path as array |
|
187 | + $paths = explode('.', $path); |
|
188 | 188 | |
189 | - // remove last path |
|
190 | - array_pop($paths); |
|
189 | + // remove last path |
|
190 | + array_pop($paths); |
|
191 | 191 | |
192 | - // Return if it was the last |
|
193 | - if(count($paths) === 0){ |
|
194 | - return; |
|
195 | - } |
|
192 | + // Return if it was the last |
|
193 | + if(count($paths) === 0){ |
|
194 | + return; |
|
195 | + } |
|
196 | 196 | |
197 | - $this->forgetEmpty($settings, implode('.', $paths)); |
|
197 | + $this->forgetEmpty($settings, implode('.', $paths)); |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | /** |