@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Behavioral\Interpreter; |
| 6 | 6 | |
| 7 | -class Number implements ExpressionInterface |
|
| 8 | -{ |
|
| 7 | +class Number implements ExpressionInterface |
|
| 8 | +{
|
|
| 9 | 9 | /** |
| 10 | 10 | * @var int |
| 11 | 11 | */ |
@@ -16,8 +16,8 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @param int $value |
| 18 | 18 | */ |
| 19 | - public function __construct(int $value) |
|
| 20 | - { |
|
| 19 | + public function __construct(int $value) |
|
| 20 | + {
|
|
| 21 | 21 | $this->value = $value; |
| 22 | 22 | } |
| 23 | 23 | |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Behavioral\NullObject; |
| 6 | 6 | |
| 7 | -class Service |
|
| 8 | -{ |
|
| 7 | +class Service |
|
| 8 | +{
|
|
| 9 | 9 | /** |
| 10 | 10 | * @var \DesignPattern\Behavioral\NullObject\LoggerInterface |
| 11 | 11 | */ |
@@ -16,8 +16,8 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @param \DesignPattern\Behavioral\NullObject\LoggerInterface $logger |
| 18 | 18 | */ |
| 19 | - public function __construct(LoggerInterface $logger) |
|
| 20 | - { |
|
| 19 | + public function __construct(LoggerInterface $logger) |
|
| 20 | + {
|
|
| 21 | 21 | $this->logger = $logger; |
| 22 | 22 | } |
| 23 | 23 | |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Behavioral\Command; |
| 6 | 6 | |
| 7 | -class StartupCommand implements CommandInterface |
|
| 8 | -{ |
|
| 7 | +class StartupCommand implements CommandInterface |
|
| 8 | +{
|
|
| 9 | 9 | /** |
| 10 | 10 | * @var \DesignPattern\Behavioral\Command\Computer |
| 11 | 11 | */ |
@@ -16,8 +16,8 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @param \DesignPattern\Behavioral\Command\Computer $computer |
| 18 | 18 | */ |
| 19 | - public function __construct(Computer $computer) |
|
| 20 | - { |
|
| 19 | + public function __construct(Computer $computer) |
|
| 20 | + {
|
|
| 21 | 21 | $this->computer = $computer; |
| 22 | 22 | } |
| 23 | 23 | |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Behavioral\Command; |
| 6 | 6 | |
| 7 | -class Console |
|
| 8 | -{ |
|
| 7 | +class Console |
|
| 8 | +{
|
|
| 9 | 9 | /** |
| 10 | 10 | * @var \DesignPattern\Behavioral\Command\CommandInterface |
| 11 | 11 | */ |
@@ -16,8 +16,8 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @param \DesignPattern\Behavioral\Command\CommandInterface $command |
| 18 | 18 | */ |
| 19 | - public function __construct(CommandInterface $command) |
|
| 20 | - { |
|
| 19 | + public function __construct(CommandInterface $command) |
|
| 20 | + {
|
|
| 21 | 21 | $this->command = $command; |
| 22 | 22 | } |
| 23 | 23 | |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Behavioral\Command; |
| 6 | 6 | |
| 7 | -class ShutdownCommand implements CommandInterface |
|
| 8 | -{ |
|
| 7 | +class ShutdownCommand implements CommandInterface |
|
| 8 | +{
|
|
| 9 | 9 | /** |
| 10 | 10 | * @var \DesignPattern\Behavioral\Command\Computer |
| 11 | 11 | */ |
@@ -16,8 +16,8 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @param \DesignPattern\Behavioral\Command\Computer $computer |
| 18 | 18 | */ |
| 19 | - public function __construct(Computer $computer) |
|
| 20 | - { |
|
| 19 | + public function __construct(Computer $computer) |
|
| 20 | + {
|
|
| 21 | 21 | $this->computer = $computer; |
| 22 | 22 | } |
| 23 | 23 | |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Creational\Multiton; |
| 6 | 6 | |
| 7 | -final class Multiton |
|
| 8 | -{ |
|
| 7 | +final class Multiton |
|
| 8 | +{
|
|
| 9 | 9 | use MultitonTrait; |
| 10 | 10 | |
| 11 | 11 | /** |
@@ -18,8 +18,8 @@ discard block |
||
| 18 | 18 | * |
| 19 | 19 | * @param string $value |
| 20 | 20 | */ |
| 21 | - private function __construct(string $value) |
|
| 22 | - { |
|
| 21 | + private function __construct(string $value) |
|
| 22 | + {
|
|
| 23 | 23 | $this->value = $value; |
| 24 | 24 | } |
| 25 | 25 | } |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Creational\Prototype; |
| 6 | 6 | |
| 7 | -abstract class Prototype |
|
| 8 | -{ |
|
| 7 | +abstract class Prototype |
|
| 8 | +{
|
|
| 9 | 9 | /** |
| 10 | 10 | * @return mixed |
| 11 | 11 | */ |
@@ -16,8 +16,8 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @return bool |
| 18 | 18 | */ |
| 19 | - public function __isset(string $property) |
|
| 20 | - { |
|
| 19 | + public function __isset(string $property) |
|
| 20 | + {
|
|
| 21 | 21 | return isset($this->{$property}); |
| 22 | 22 | } |
| 23 | 23 | |
@@ -25,8 +25,8 @@ discard block |
||
| 25 | 25 | * @param string $property |
| 26 | 26 | * @param mixed $value |
| 27 | 27 | */ |
| 28 | - public function __set(string $property, $value) |
|
| 29 | - { |
|
| 28 | + public function __set(string $property, $value) |
|
| 29 | + {
|
|
| 30 | 30 | $this->{$property} = $value; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -35,9 +35,9 @@ discard block |
||
| 35 | 35 | * |
| 36 | 36 | * @return null |
| 37 | 37 | */ |
| 38 | - public function __get(string $property) |
|
| 39 | - { |
|
| 40 | - if (property_exists($this, $property)) { |
|
| 38 | + public function __get(string $property) |
|
| 39 | + {
|
|
| 40 | + if (property_exists($this, $property)) {
|
|
| 41 | 41 | return $this->{$property}; |
| 42 | 42 | } |
| 43 | 43 | |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Creational\AbstractFactory; |
| 6 | 6 | |
| 7 | -abstract class Text implements RendererInterface |
|
| 8 | -{ |
|
| 7 | +abstract class Text implements RendererInterface |
|
| 8 | +{
|
|
| 9 | 9 | /** |
| 10 | 10 | * @var string |
| 11 | 11 | */ |
@@ -16,8 +16,8 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @param string $text |
| 18 | 18 | */ |
| 19 | - public function __construct(string $text) |
|
| 20 | - { |
|
| 19 | + public function __construct(string $text) |
|
| 20 | + {
|
|
| 21 | 21 | $this->text = $text; |
| 22 | 22 | } |
| 23 | 23 | } |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Creational\AbstractFactory; |
| 6 | 6 | |
| 7 | -abstract class Image implements RendererInterface |
|
| 8 | -{ |
|
| 7 | +abstract class Image implements RendererInterface |
|
| 8 | +{
|
|
| 9 | 9 | /** |
| 10 | 10 | * @var string |
| 11 | 11 | */ |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | * @param string $path |
| 23 | 23 | * @param string $title |
| 24 | 24 | */ |
| 25 | - public function __construct(string $path, string $title = '') |
|
| 26 | - { |
|
| 25 | + public function __construct(string $path, string $title = '') |
|
| 26 | + {
|
|
| 27 | 27 | $this->path = $path; |
| 28 | 28 | $this->title = $title; |
| 29 | 29 | } |