Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
zendframework/zendframework#6884 - minor CS fixes (spacing)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Dec 6, 2014
1 parent 3d581b5 commit 3448450
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/AbstractOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ public function toArray()
public function __set($key, $value)
{
$setter = 'set' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key)));
if (!is_callable(array($this, $setter))) {

if (! is_callable(array($this, $setter))) {
if (! $this->__strictMode__) {
return;
}
Expand All @@ -120,14 +121,15 @@ public function __set($key, $value)
public function __get($key)
{
$getter = 'get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key)));
if (!is_callable(array($this, $getter))) {

if (! is_callable(array($this, $getter))) {
throw new Exception\BadMethodCallException(
'The option "' . $key . '" does not '
. 'have a callable "' . $getter . '" getter method '
. 'which must be defined'
);
}
// else: Getter method is callable

return $this->{$getter}();
}

Expand Down

0 comments on commit 3448450

Please sign in to comment.