@@ -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->availableProperties)) { |
|
| 33 | - throw new UnavailablePropertyException; |
|
| 34 | - } |
|
| 30 | + public function __set($key, $value) |
|
| 31 | + { |
|
| 32 | + if (! in_array($key, $this->availableProperties)) { |
|
| 33 | + throw new UnavailablePropertyException; |
|
| 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 | } |
@@ -22,14 +22,14 @@ |
||
| 22 | 22 | |
| 23 | 23 | public function pattern($value) |
| 24 | 24 | { |
| 25 | - $value = (is_array($value)) ? $value : [$value] ; |
|
| 25 | + $value = (is_array($value)) ? $value : [$value]; |
|
| 26 | 26 | |
| 27 | 27 | $this->pattern = $value; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | public function __set($key, $value) |
| 31 | 31 | { |
| 32 | - if (! in_array($key, $this->availableProperties)) { |
|
| 32 | + if (!in_array($key, $this->availableProperties)) { |
|
| 33 | 33 | throw new UnavailablePropertyException; |
| 34 | 34 | } |
| 35 | 35 | |