@@ -15,11 +15,11 @@ discard block |
||
15 | 15 | public function __call($methodName, $args) { |
16 | 16 | // are we getting or setting? |
17 | 17 | if (preg_match('~^(set|get|is)([A-Z])(.*)$~', $methodName, $matches)) { |
18 | - $property = strtolower($matches[2]) . $matches[3]; |
|
18 | + $property = strtolower($matches[2]).$matches[3]; |
|
19 | 19 | if (!property_exists($this, $property)) { |
20 | - throw new \InvalidArgumentException('Property ' . $property . ' is not exist'); |
|
20 | + throw new \InvalidArgumentException('Property '.$property.' is not exist'); |
|
21 | 21 | } |
22 | - switch($matches[1]) { |
|
22 | + switch ($matches[1]) { |
|
23 | 23 | case 'set': |
24 | 24 | $this->checkArguments($args, 1, 1, $methodName); |
25 | 25 | return $this->set($property, $args[0]); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $this->checkArguments($args, 0, 0, $methodName); |
29 | 29 | return $this->get($property); |
30 | 30 | case 'default': |
31 | - throw new \BadMethodCallException('Method ' . $methodName . ' is not exist'); |
|
31 | + throw new \BadMethodCallException('Method '.$methodName.' is not exist'); |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | protected function checkArguments(array $args, $min, $max, $methodName) { |
64 | 64 | $argc = count($args); |
65 | 65 | if ($argc < $min || $argc > $max) { |
66 | - throw new \BadMethodCallException('Method ' . $methodName . ' is not exist'); |
|
66 | + throw new \BadMethodCallException('Method '.$methodName.' is not exist'); |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 |