@@ -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 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | namespace DesignPattern\Structural\Bridge; |
| 6 | 6 | |
| 7 | -abstract class Service |
|
| 8 | -{ |
|
| 7 | +abstract class Service |
|
| 8 | +{
|
|
| 9 | 9 | /** |
| 10 | 10 | * @var \DesignPattern\Structural\Bridge\FormatterInterface |
| 11 | 11 | */ |
@@ -16,8 +16,8 @@ discard block |
||
| 16 | 16 | * |
| 17 | 17 | * @param \DesignPattern\Structural\Bridge\FormatterInterface $formatter |
| 18 | 18 | */ |
| 19 | - public function __construct(FormatterInterface $formatter) |
|
| 20 | - { |
|
| 19 | + public function __construct(FormatterInterface $formatter) |
|
| 20 | + {
|
|
| 21 | 21 | $this->formatter = $formatter; |
| 22 | 22 | } |
| 23 | 23 | |
@@ -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,8 +2,8 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | namespace DesignPattern\Structural\DependencyInjection; |
| 4 | 4 | |
| 5 | -class DepartmentStore |
|
| 6 | -{ |
|
| 5 | +class DepartmentStore |
|
| 6 | +{
|
|
| 7 | 7 | /** |
| 8 | 8 | * @var \DesignPattern\Structural\DependencyInjection\AbstractMap |
| 9 | 9 | */ |
@@ -14,8 +14,8 @@ discard block |
||
| 14 | 14 | * |
| 15 | 15 | * @param \DesignPattern\Structural\DependencyInjection\AbstractMap $mapService |
| 16 | 16 | */ |
| 17 | - public function __construct(AbstractMap $mapService) |
|
| 18 | - { |
|
| 17 | + public function __construct(AbstractMap $mapService) |
|
| 18 | + {
|
|
| 19 | 19 | $this->mapService = $mapService; |
| 20 | 20 | } |
| 21 | 21 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function getStoreCoordinate(string $address): string |
| 31 | 31 | { |
| 32 | - if (empty($address)) { |
|
| 32 | + if (empty($address)) {
|
|
| 33 | 33 | throw new \InvalidArgumentException('Please enter the address.'); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -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 | * |