Completed
Push — 2.0 ( 059513...f86834 )
by Nicolas
02:08
created

SettingDirective::extractArguments()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 6
rs 9.4285
1
<?php
2
3
namespace Modules\Setting\Blade;
4
5
final class SettingDirective
6
{
7
    /**
8
     * @var string
9
     */
10
    private $settingName;
11
    /**
12
     * @var string
13
     */
14
    private $locale;
15
    /**
16
     * @var string Default value
17
     */
18
    private $default;
19
20
    /**
21
     * @param $arguments
22
     */
23
    public function show($arguments)
24
    {
25
        $this->extractArguments($arguments);
26
27
        return setting($this->settingName, $this->locale, $this->default);
28
    }
29
30
    /**
31
     * @param array $arguments
32
     */
33
    private function extractArguments(array $arguments)
34
    {
35
        $this->settingName = array_get($arguments, 0);
36
        $this->locale = array_get($arguments, 1);
37
        $this->default = array_get($arguments, 2);
38
    }
39
}
40