@@ -47,6 +47,9 @@ |
||
47 | 47 | return $this->options[$key] = $value; |
48 | 48 | } |
49 | 49 | |
50 | + /** |
|
51 | + * @param string $type |
|
52 | + */ |
|
50 | 53 | protected function formatMethod($key, $type) |
51 | 54 | { |
52 | 55 | $method = $type . studly_case($key) . 'Property'; |
@@ -27,34 +27,34 @@ |
||
27 | 27 | $this->pattern = $value; |
28 | 28 | } |
29 | 29 | |
30 | - public function __set($key, $value) |
|
31 | - { |
|
32 | - if (! in_array($key, $this->availableMethods)) { |
|
33 | - throw new UnavailableMethodException; |
|
34 | - } |
|
30 | + public function __set($key, $value) |
|
31 | + { |
|
32 | + if (! in_array($key, $this->availableMethods)) { |
|
33 | + throw new UnavailableMethodException; |
|
34 | + } |
|
35 | 35 | |
36 | - return $this->setAttribute($key, $value); |
|
37 | - } |
|
36 | + return $this->setAttribute($key, $value); |
|
37 | + } |
|
38 | 38 | |
39 | - protected function setAttribute($key, $value) |
|
40 | - { |
|
41 | - $method = $this->formatMethod($key, 'set'); |
|
39 | + protected function setAttribute($key, $value) |
|
40 | + { |
|
41 | + $method = $this->formatMethod($key, 'set'); |
|
42 | 42 | |
43 | - if ($method) { |
|
44 | - return $this->{$method}($value); |
|
45 | - } |
|
43 | + if ($method) { |
|
44 | + return $this->{$method}($value); |
|
45 | + } |
|
46 | 46 | |
47 | - return $this->options[$key] = $value; |
|
48 | - } |
|
47 | + return $this->options[$key] = $value; |
|
48 | + } |
|
49 | 49 | |
50 | - protected function formatMethod($key, $type) |
|
51 | - { |
|
52 | - $method = $type . studly_case($key) . 'Property'; |
|
50 | + protected function formatMethod($key, $type) |
|
51 | + { |
|
52 | + $method = $type . studly_case($key) . 'Property'; |
|
53 | 53 | |
54 | - if (method_exists($this, $method)) { |
|
55 | - return $method; |
|
56 | - } |
|
54 | + if (method_exists($this, $method)) { |
|
55 | + return $method; |
|
56 | + } |
|
57 | 57 | |
58 | - return null; |
|
59 | - } |
|
58 | + return null; |
|
59 | + } |
|
60 | 60 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | { |
10 | 10 | protected function setEnabledProperty($value) |
11 | 11 | { |
12 | - if (! is_bool($value)) { |
|
12 | + if (!is_bool($value)) { |
|
13 | 13 | throw new InvalidArgumentException('Credits Enabled must be : boolean'); |
14 | 14 | } |
15 | 15 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | { |
19 | 19 | $availableTypes = array_keys($this->config['available_types']); |
20 | 20 | |
21 | - if (! in_array($type, $availableTypes)) { |
|
21 | + if (!in_array($type, $availableTypes)) { |
|
22 | 22 | throw new UnavailableTypeException; |
23 | 23 | } |
24 | 24 |