@@ -2,8 +2,8 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace DesignPattern\Structural\FluentInterface; |
4 | 4 | |
5 | -class Mysql implements FluentInterface |
|
6 | -{ |
|
5 | +class Mysql implements FluentInterface |
|
6 | +{ |
|
7 | 7 | /** |
8 | 8 | * @var array |
9 | 9 | */ |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * @return string |
24 | 24 | */ |
25 | - public function __toString() |
|
26 | - { |
|
25 | + public function __toString() |
|
26 | + { |
|
27 | 27 | return sprintf( |
28 | 28 | 'SELECT %s FROM %s WHERE %s', |
29 | 29 | implode(',', $this->fields), |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace DesignPattern\Structural\Proxy; |
4 | 4 | |
5 | -interface WifiNetworkInterface |
|
6 | -{ |
|
5 | +interface WifiNetworkInterface |
|
6 | +{ |
|
7 | 7 | /** |
8 | 8 | * Grant access to the Wifi network to an employee. |
9 | 9 | * |
@@ -2,8 +2,8 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace DesignPattern\Structural\Proxy; |
4 | 4 | |
5 | -class Employee |
|
6 | -{ |
|
5 | +class Employee |
|
6 | +{ |
|
7 | 7 | /** |
8 | 8 | * No access to WiFi. |
9 | 9 | */ |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | string $username, |
41 | 41 | string $password, |
42 | 42 | int $accessLevel |
43 | - ) { |
|
43 | + ) { |
|
44 | 44 | $this->username = $username; |
45 | 45 | $this->password = $password; |
46 | 46 | $this->accessLevel = $accessLevel; |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace DesignPattern\Structural\Facade; |
4 | 4 | |
5 | -interface MacOSInterface |
|
6 | -{ |
|
5 | +interface MacOSInterface |
|
6 | +{ |
|
7 | 7 | public function restart(); |
8 | 8 | |
9 | 9 | public function shutdown(); |
@@ -2,8 +2,8 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace DesignPattern\Structural\Facade; |
4 | 4 | |
5 | -class Bios implements BiosInterface |
|
6 | -{ |
|
5 | +class Bios implements BiosInterface |
|
6 | +{ |
|
7 | 7 | /** |
8 | 8 | * @return string |
9 | 9 | */ |
@@ -17,8 +17,8 @@ discard block |
||
17 | 17 | * |
18 | 18 | * @return mixed |
19 | 19 | */ |
20 | - public function launch(MacOSInterface $macOS) |
|
21 | - { |
|
20 | + public function launch(MacOSInterface $macOS) |
|
21 | + { |
|
22 | 22 | return $macOS->launch(); |
23 | 23 | } |
24 | 24 |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace DesignPattern\Structural\Facade; |
4 | 4 | |
5 | -interface BiosInterface |
|
6 | -{ |
|
5 | +interface BiosInterface |
|
6 | +{ |
|
7 | 7 | public function execute(); |
8 | 8 | |
9 | 9 | /** |
@@ -4,8 +4,8 @@ |
||
4 | 4 | |
5 | 5 | namespace DesignPattern\Structural\Composite; |
6 | 6 | |
7 | -interface RenderableInterface |
|
8 | -{ |
|
7 | +interface RenderableInterface |
|
8 | +{ |
|
9 | 9 | /** |
10 | 10 | * Render HTML element. |
11 | 11 | * |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace DesignPattern\Structural\Decorator; |
4 | 4 | |
5 | -class JsonRender extends RendererDecorator |
|
6 | -{ |
|
5 | +class JsonRender extends RendererDecorator |
|
6 | +{ |
|
7 | 7 | /** |
8 | 8 | * @return string |
9 | 9 | */ |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace DesignPattern\Structural\Decorator; |
4 | 4 | |
5 | -class XmlRender extends RendererDecorator |
|
6 | -{ |
|
5 | +class XmlRender extends RendererDecorator |
|
6 | +{ |
|
7 | 7 | /** |
8 | 8 | * @return string |
9 | 9 | */ |