@@ -23,14 +23,14 @@ discard block |
||
| 23 | 23 | public function __call($name, $arguments) |
| 24 | 24 | { |
| 25 | 25 | //TODO: hack ;-( |
| 26 | - if( in_array($name, ['setPropertiesBag', 'setSettersBag'], true) ){ |
|
| 26 | + if (in_array($name, ['setPropertiesBag', 'setSettersBag'], true)) { |
|
| 27 | 27 | $this->$name(...$arguments); |
| 28 | 28 | return; |
| 29 | - }elseif( in_array($name, ['getPropertiesBag','getSettersBag'], true) ){ |
|
| 29 | + }elseif (in_array($name, ['getPropertiesBag', 'getSettersBag'], true)) { |
|
| 30 | 30 | return $this->$name(...$arguments); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - if( ! $this->isSetterAllowed($name) ) { |
|
| 33 | + if ( ! $this->isSetterAllowed($name)) { |
|
| 34 | 34 | $trace = debug_backtrace(); |
| 35 | 35 | trigger_error( |
| 36 | 36 | 'Disallowed getter/setter ' . $name . |
@@ -41,9 +41,9 @@ discard block |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | $attribute = strtolower(substr($name, 3)); |
| 44 | - if($this->isSetter($name)){ |
|
| 44 | + if ($this->isSetter($name)) { |
|
| 45 | 45 | $this->$attribute = $arguments[0]; |
| 46 | - } elseif( $this->isGetter($name) ) { |
|
| 46 | + } elseif ($this->isGetter($name)) { |
|
| 47 | 47 | return $this->$attribute; |
| 48 | 48 | } else { |
| 49 | 49 | $name(...$arguments); |
@@ -52,10 +52,10 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | public function equals($o): bool |
| 54 | 54 | { |
| 55 | - foreach ($this->setters as $getter){ |
|
| 56 | - if( $this->isGetter($getter) ) |
|
| 55 | + foreach ($this->setters as $getter) { |
|
| 56 | + if ($this->isGetter($getter)) |
|
| 57 | 57 | { |
| 58 | - if( $this->$getter() != $o->$getter() ) |
|
| 58 | + if ($this->$getter() != $o->$getter()) |
|
| 59 | 59 | return false; |
| 60 | 60 | } |
| 61 | 61 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | if( in_array($name, ['setPropertiesBag', 'setSettersBag'], true) ){ |
| 27 | 27 | $this->$name(...$arguments); |
| 28 | 28 | return; |
| 29 | - }elseif( in_array($name, ['getPropertiesBag','getSettersBag'], true) ){ |
|
| 29 | + } elseif( in_array($name, ['getPropertiesBag','getSettersBag'], true) ){ |
|
| 30 | 30 | return $this->$name(...$arguments); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -55,8 +55,9 @@ discard block |
||
| 55 | 55 | foreach ($this->setters as $getter){ |
| 56 | 56 | if( $this->isGetter($getter) ) |
| 57 | 57 | { |
| 58 | - if( $this->$getter() != $o->$getter() ) |
|
| 59 | - return false; |
|
| 58 | + if( $this->$getter() != $o->$getter() ) { |
|
| 59 | + return false; |
|
| 60 | + } |
|
| 60 | 61 | } |
| 61 | 62 | } |
| 62 | 63 | return true; |