@@ -4,8 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Structural\Bridge; |
| 6 | 6 | |
| 7 | -class StringService extends Service |
|
| 8 | -{ |
|
| 7 | +class StringService extends Service |
|
| 8 | +{
|
|
| 9 | 9 | /** |
| 10 | 10 | * {@inheritdoc} |
| 11 | 11 | * |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Structural\Bridge; |
| 6 | 6 | |
| 7 | -class DateFormatter implements FormatterInterface |
|
| 8 | -{ |
|
| 7 | +class DateFormatter implements FormatterInterface |
|
| 8 | +{
|
|
| 9 | 9 | /** |
| 10 | 10 | * Format timestamp string to Date. |
| 11 | 11 | * |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Structural\Bridge; |
| 6 | 6 | |
| 7 | -interface FormatterInterface |
|
| 8 | -{ |
|
| 7 | +interface FormatterInterface |
|
| 8 | +{
|
|
| 9 | 9 | /** |
| 10 | 10 | * Formatter method. |
| 11 | 11 | * |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Structural\Bridge; |
| 6 | 6 | |
| 7 | -class HtmlFormatter implements FormatterInterface |
|
| 8 | -{ |
|
| 7 | +class HtmlFormatter implements FormatterInterface |
|
| 8 | +{
|
|
| 9 | 9 | /** |
| 10 | 10 | * Format string to HTML. |
| 11 | 11 | * |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace DesignPattern\Structural\DependencyInjection; |
| 4 | 4 | |
| 5 | -interface GeolocationServiceInterface |
|
| 6 | -{ |
|
| 5 | +interface GeolocationServiceInterface |
|
| 6 | +{
|
|
| 7 | 7 | /** |
| 8 | 8 | * Get coordinate from address. |
| 9 | 9 | * |
@@ -2,6 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace DesignPattern\Structural\DependencyInjection; |
| 4 | 4 | |
| 5 | -class GoogleMap extends AbstractMap |
|
| 6 | -{ |
|
| 5 | +class GoogleMap extends AbstractMap |
|
| 6 | +{
|
|
| 7 | 7 | } |
@@ -2,6 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace DesignPattern\Structural\DependencyInjection; |
| 4 | 4 | |
| 5 | -class BaiduMap extends AbstractMap |
|
| 6 | -{ |
|
| 5 | +class BaiduMap extends AbstractMap |
|
| 6 | +{
|
|
| 7 | 7 | } |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace DesignPattern\Structural\DependencyInjection; |
| 4 | 4 | |
| 5 | -abstract class AbstractMap implements GeolocationServiceInterface |
|
| 6 | -{ |
|
| 5 | +abstract class AbstractMap implements GeolocationServiceInterface |
|
| 6 | +{
|
|
| 7 | 7 | /** |
| 8 | 8 | * Get coordinate from address. |
| 9 | 9 | * |
@@ -4,25 +4,25 @@ |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Behavioral\State; |
| 6 | 6 | |
| 7 | -class Order |
|
| 8 | -{ |
|
| 7 | +class Order |
|
| 8 | +{
|
|
| 9 | 9 | /** |
| 10 | 10 | * @var \DesignPattern\Behavioral\State\StateInterface|null |
| 11 | 11 | */ |
| 12 | 12 | private ?StateInterface $state; |
| 13 | 13 | |
| 14 | - public function cancel() |
|
| 15 | - { |
|
| 14 | + public function cancel() |
|
| 15 | + {
|
|
| 16 | 16 | return $this->state->toCancel($this); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | - public function pay() |
|
| 20 | - { |
|
| 19 | + public function pay() |
|
| 20 | + {
|
|
| 21 | 21 | return $this->state->toPay($this); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - public function dispatch() |
|
| 25 | - { |
|
| 24 | + public function dispatch() |
|
| 25 | + {
|
|
| 26 | 26 | return $this->state->toDispatch($this); |
| 27 | 27 | } |
| 28 | 28 | |