@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | public function guardExtended($value, ...$other): void |
| 35 | 35 | { |
| 36 | 36 | /** @var ValueObjectInterface $value*/ |
| 37 | - if (mb_strlen($value->getValue())< self::NAME_MIN_LENGTH) { |
|
| 37 | + if (mb_strlen($value->getValue()) < self::NAME_MIN_LENGTH) { |
|
| 38 | 38 | throw new InvalidVOArgumentException(sprintf('Middle name must contain a minimum of %s symbols.', self::NAME_MIN_LENGTH), $value); |
| 39 | 39 | } |
| 40 | 40 | } |
@@ -64,6 +64,6 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function getFullName(): string |
| 66 | 66 | { |
| 67 | - return $this->getFirstName() .' '.$this->getMiddleName() .' '. $this->getLastName(); |
|
| 67 | + return $this->getFirstName().' '.$this->getMiddleName().' '.$this->getLastName(); |
|
| 68 | 68 | } |
| 69 | 69 | } |
@@ -41,10 +41,10 @@ discard block |
||
| 41 | 41 | /** @var ValueObjectInterface $value*/ |
| 42 | 42 | parent::guard($other[0]); |
| 43 | 43 | /** @var ValueObjectInterface[] $other*/ |
| 44 | - if (mb_strlen($value->getValue())< self::NAME_MIN_LENGTH) { |
|
| 44 | + if (mb_strlen($value->getValue()) < self::NAME_MIN_LENGTH) { |
|
| 45 | 45 | throw new InvalidVOArgumentException(sprintf('First name must contain a minimum of %s symbols.', self::NAME_MIN_LENGTH), $value); |
| 46 | 46 | } |
| 47 | - if (mb_strlen($other[0]->getValue())< self::NAME_MIN_LENGTH) { |
|
| 47 | + if (mb_strlen($other[0]->getValue()) < self::NAME_MIN_LENGTH) { |
|
| 48 | 48 | throw new InvalidVOArgumentException(sprintf('Last name must contain a minimum of %s symbols.', self::NAME_MIN_LENGTH), $value); |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | */ |
| 82 | 82 | public function getFullName(): string |
| 83 | 83 | { |
| 84 | - return $this->firstName->getValue() .' '.$this->lastName->getValue(); |
|
| 84 | + return $this->firstName->getValue().' '.$this->lastName->getValue(); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | public function __construct(string $message = '', $object = null, int $code = 0, Throwable $previous = null) |
| 23 | 23 | { |
| 24 | 24 | if (!$message) { |
| 25 | - throw new $this('Unknown '. \get_class($this)); |
|
| 25 | + throw new $this('Unknown '.\get_class($this)); |
|
| 26 | 26 | } |
| 27 | 27 | $this->object = $object; |
| 28 | 28 | parent::__construct($message, $code, $previous); |
@@ -38,8 +38,8 @@ discard block |
||
| 38 | 38 | echo '<pre>'; |
| 39 | 39 | var_dump($this->object); |
| 40 | 40 | echo '</pre>'; |
| 41 | - $this->message = $this->message . "\nDebug Info: " . ob_get_clean(); |
|
| 41 | + $this->message = $this->message."\nDebug Info: ".ob_get_clean(); |
|
| 42 | 42 | } |
| 43 | - return get_class($this) . " '{$this->message}'\n in {$this->file}({$this->line})\n{$this->getTraceAsString()}"; |
|
| 43 | + return get_class($this)." '{$this->message}'\n in {$this->file}({$this->line})\n{$this->getTraceAsString()}"; |
|
| 44 | 44 | } |
| 45 | 45 | } |