| @@ 40-45 (lines=6) @@ | ||
| 37 | return call_user_func_array([$this->getConfig(), $method], $arguments); |
|
| 38 | } elseif (substr($method, 0, 3) == 'get') { |
|
| 39 | $propertyName = lcfirst(substr($method, 3)); |
|
| 40 | } elseif (substr($method, 0, 3) == 'set') { |
|
| 41 | $propertyName = lcfirst(substr($method, 3)); |
|
| 42 | $this->getConfig()->set($propertyName, $arguments[0]); |
|
| 43 | ||
| 44 | return $this; |
|
| 45 | } elseif (substr($method, 0, 2) == 'is') { |
|
| 46 | $propertyName = lcfirst(substr($method, 2)); |
|
| 47 | } |
|
| 48 | if (in_array($propertyName, ['name', 'description', 'deprecationReason', 'isDeprecated', 'field', 'type'])) { |
|
| @@ 153-158 (lines=6) @@ | ||
| 150 | { |
|
| 151 | if (substr($method, 0, 3) == 'get') { |
|
| 152 | $propertyName = lcfirst(substr($method, 3)); |
|
| 153 | } elseif (substr($method, 0, 3) == 'set') { |
|
| 154 | $propertyName = lcfirst(substr($method, 3)); |
|
| 155 | $this->set($propertyName, $arguments[0]); |
|
| 156 | ||
| 157 | return $this; |
|
| 158 | } elseif (substr($method, 0, 2) == 'is') { |
|
| 159 | $propertyName = lcfirst(substr($method, 2)); |
|
| 160 | } else { |
|
| 161 | throw new \Exception('Call to undefined method ' . $method); |
|