@@ -2,8 +2,8 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | namespace DesignPattern\Structural\Registry; |
| 4 | 4 | |
| 5 | -abstract class Registry |
|
| 6 | -{ |
|
| 5 | +abstract class Registry |
|
| 6 | +{
|
|
| 7 | 7 | public const LOGGER = 'logger'; |
| 8 | 8 | |
| 9 | 9 | /** |
@@ -18,8 +18,8 @@ discard block |
||
| 18 | 18 | * |
| 19 | 19 | * @return mixed |
| 20 | 20 | */ |
| 21 | - public static function get(string $key) |
|
| 22 | - { |
|
| 21 | + public static function get(string $key) |
|
| 22 | + {
|
|
| 23 | 23 | return self::$collection[$key]; |
| 24 | 24 | } |
| 25 | 25 | |
@@ -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 | * |
@@ -13,6 +13,6 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function get(): string |
| 15 | 15 | { |
| 16 | - return $this->formatter->format((string)time()); |
|
| 16 | + return $this->formatter->format((string) time()); |
|
| 17 | 17 | } |
| 18 | 18 | } |
@@ -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 | * |
@@ -15,6 +15,6 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function format(string $string): string |
| 17 | 17 | { |
| 18 | - return date('Y-m-d', (int)$string); |
|
| 18 | + return date('Y-m-d', (int) $string); |
|
| 19 | 19 | } |
| 20 | 20 | } |
@@ -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 | * |