Test Failed
Branch master (d02fed)
by Jinyun
07:13
created
src/Structural/DataMapper/Repository.php 1 patch
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 
5 5
 namespace DesignPattern\Structural\DataMapper;
6 6
 
7
-class Repository
8
-{
7
+class Repository
8
+{
9 9
     /**
10 10
      * @var array
11 11
      */
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @param  array  $data
18 18
      */
19
-    public function __construct(array $data)
20
-    {
19
+    public function __construct(array $data)
20
+    {
21 21
         $this->data = $data;
22 22
     }
23 23
 
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
      *
29 29
      * @return mixed|null
30 30
      */
31
-    public function find(int $id)
32
-    {
31
+    public function find(int $id)
32
+    {
33 33
         return $this->data[$id] ?? null;
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
src/Structural/DataMapper/User.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 
5 5
 namespace DesignPattern\Structural\DataMapper;
6 6
 
7
-class User
8
-{
7
+class User
8
+{
9 9
     /**
10 10
      * @var string
11 11
      */
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
      * @param  string  $username
23 23
      * @param  string  $email
24 24
      */
25
-    public function __construct(string $username, string $email)
26
-    {
25
+    public function __construct(string $username, string $email)
26
+    {
27 27
         $this->username = $username;
28 28
         $this->email = $email;
29 29
     }
Please login to merge, or discard this patch.
src/Structural/DataMapper/UserMapper.php 1 patch
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 
5 5
 namespace DesignPattern\Structural\DataMapper;
6 6
 
7
-class UserMapper
8
-{
7
+class UserMapper
8
+{
9 9
     /**
10 10
      * @var \DesignPattern\Structural\DataMapper\Repository
11 11
      */
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @param  \DesignPattern\Structural\DataMapper\Repository  $repository
18 18
      */
19
-    public function __construct(Repository $repository)
20
-    {
19
+    public function __construct(Repository $repository)
20
+    {
21 21
         $this->repository = $repository;
22 22
     }
23 23
 
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
      * @return mixed
30 30
      * @throws \InvalidArgumentException
31 31
      */
32
-    public function findById(int $id)
33
-    {
32
+    public function findById(int $id)
33
+    {
34 34
         $result = $this->repository->find($id);
35 35
 
36
-        if ($result === null) {
36
+        if ($result === null) {
37 37
             throw new \InvalidArgumentException("User #$id not found.", $id);
38 38
         }
39 39
 
Please login to merge, or discard this patch.
src/Structural/Decorator/Webservice.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 
5 5
 namespace DesignPattern\Structural\Decorator;
6 6
 
7
-class Webservice implements RenderableInterface
8
-{
7
+class Webservice implements RenderableInterface
8
+{
9 9
     /**
10 10
      * @var string
11 11
      */
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @param  string  $data
18 18
      */
19
-    public function __construct(string $data)
20
-    {
19
+    public function __construct(string $data)
20
+    {
21 21
         $this->data = $data;
22 22
     }
23 23
 
Please login to merge, or discard this patch.
src/Structural/Decorator/RendererDecorator.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 
5 5
 namespace DesignPattern\Structural\Decorator;
6 6
 
7
-abstract class RendererDecorator
8
-{
7
+abstract class RendererDecorator
8
+{
9 9
     /**
10 10
      * @var \DesignPattern\Structural\Decorator\RenderableInterface
11 11
      */
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @param  \DesignPattern\Structural\Decorator\RenderableInterface  $renderable
18 18
      */
19
-    public function __construct(RenderableInterface $renderable)
20
-    {
19
+    public function __construct(RenderableInterface $renderable)
20
+    {
21 21
         $this->renderable = $renderable;
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Structural/Proxy/WifiNetwork.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 
5 5
 namespace DesignPattern\Structural\Proxy;
6 6
 
7
-class WifiNetwork implements WifiNetworkInterface
8
-{
7
+class WifiNetwork implements WifiNetworkInterface
8
+{
9 9
     /**
10 10
      * @var string
11 11
      */
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @param  string  $name
18 18
      */
19
-    public function __construct(string $name)
20
-    {
19
+    public function __construct(string $name)
20
+    {
21 21
         $this->name = $name;
22 22
     }
23 23
 
Please login to merge, or discard this patch.
src/Structural/Proxy/WifiNetworkProxy.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 
5 5
 namespace DesignPattern\Structural\Proxy;
6 6
 
7
-class WifiNetworkProxy implements WifiNetworkInterface
8
-{
7
+class WifiNetworkProxy implements WifiNetworkInterface
8
+{
9 9
     /**
10 10
      * @var \DesignPattern\Structural\Proxy\WifiNetwork
11 11
      */
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @param  string  $name
18 18
      */
19
-    public function __construct(string $name)
20
-    {
19
+    public function __construct(string $name)
20
+    {
21 21
         $this->wifiNetwork = new WifiNetwork($name);
22 22
     }
23 23
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function grantAccess(Employee $employee): bool
32 32
     {
33
-        if ($employee->getAccessLevel() === Employee::ACCESS_LEVEL_ALLOW) {
33
+        if ($employee->getAccessLevel() === Employee::ACCESS_LEVEL_ALLOW) {
34 34
             return $this->wifiNetwork->grantAccess($employee);
35 35
         }
36 36
 
Please login to merge, or discard this patch.
src/Structural/DependencyInjection/DepartmentStore.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 
5 5
 namespace DesignPattern\Structural\DependencyInjection;
6 6
 
7
-class DepartmentStore
8
-{
7
+class DepartmentStore
8
+{
9 9
     /**
10 10
      * @var \DesignPattern\Structural\DependencyInjection\AbstractMap
11 11
      */
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @param  \DesignPattern\Structural\DependencyInjection\AbstractMap  $mapService
18 18
      */
19
-    public function __construct(AbstractMap $mapService)
20
-    {
19
+    public function __construct(AbstractMap $mapService)
20
+    {
21 21
         $this->mapService = $mapService;
22 22
     }
23 23
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function getStoreCoordinate(string $address): string
34 34
     {
35
-        if (empty($address)) {
35
+        if (empty($address)) {
36 36
             throw new \InvalidArgumentException('Please enter the address.');
37 37
         }
38 38
 
Please login to merge, or discard this patch.
src/Structural/Bridge/DateFormatter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,6 +15,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.