Test Failed
Branch master (d02fed)
by Jinyun
07:13
created
src/Structural/Bridge/Service.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\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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Structural/Adapter/UserAdapter.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\Adapter;
6 6
 
7
-class UserAdapter implements UserInterface
8
-{
7
+class UserAdapter implements UserInterface
8
+{
9 9
     /**
10 10
      * @var \DesignPattern\Structural\Adapter\MemberInterface
11 11
      */
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @param  \DesignPattern\Structural\Adapter\MemberInterface  $member
18 18
      */
19
-    public function __construct(MemberInterface $member)
20
-    {
19
+    public function __construct(MemberInterface $member)
20
+    {
21 21
         $this->member = $member;
22 22
     }
23 23
 
Please login to merge, or discard this patch.
src/Structural/Flyweight/Gun.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\Flyweight;
6 6
 
7
-class Gun
8
-{
7
+class Gun
8
+{
9 9
     /**
10 10
      * @var array|BulletInterface[]
11 11
      */
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
      *
22 22
      * @param  int  $maxBullets
23 23
      */
24
-    public function __construct(int $maxBullets)
25
-    {
24
+    public function __construct(int $maxBullets)
25
+    {
26 26
         $this->bullets = [];
27 27
         $this->maxBullets = $maxBullets;
28 28
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function reload(string $type): void
52 52
     {
53 53
         $count = count($this->bullets);
54
-        for (; $count < $this->maxBullets; $count++) {
54
+        for (; $count < $this->maxBullets; $count++) {
55 55
             $this->bullets[] = BulletFactory::getInstance($type);
56 56
         }
57 57
     }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function fire(): string
63 63
     {
64
-        if ($count = count($this->bullets)) {
64
+        if ($count = count($this->bullets)) {
65 65
             $bullet = array_shift($this->bullets);
66 66
             $bullet->setPositionInMagazine($this->maxBullets - $count + 1);
67 67
 
Please login to merge, or discard this patch.
src/Structural/Flyweight/BulletInterface.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 namespace DesignPattern\Structural\Flyweight;
6 6
 
7
-interface BulletInterface
8
-{
7
+interface BulletInterface
8
+{
9 9
     /**
10 10
      * @param  int  $position
11 11
      */
Please login to merge, or discard this patch.
src/Structural/Facade/Facade.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\Facade;
6 6
 
7
-class Facade
8
-{
7
+class Facade
8
+{
9 9
     /**
10 10
      * @var \DesignPattern\Structural\Facade\BiosInterface
11 11
      */
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
      * @param  \DesignPattern\Structural\Facade\BiosInterface  $bios
23 23
      * @param  \DesignPattern\Structural\Facade\MacOSInterface  $macOS
24 24
      */
25
-    public function __construct(BiosInterface $bios, MacOSInterface $macOS)
26
-    {
25
+    public function __construct(BiosInterface $bios, MacOSInterface $macOS)
26
+    {
27 27
         $this->bios = $bios;
28 28
         $this->macOS = $macOS;
29 29
     }
Please login to merge, or discard this patch.
src/Structural/Composite/InputElement.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\Composite;
6 6
 
7
-class InputElement implements RenderableInterface
8
-{
7
+class InputElement implements RenderableInterface
8
+{
9 9
     /**
10 10
      * @var string
11 11
      */
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
      * @param  string  $name
23 23
      * @param  string  $type
24 24
      */
25
-    public function __construct(string $name, string $type = 'text')
26
-    {
25
+    public function __construct(string $name, string $type = 'text')
26
+    {
27 27
         $this->name = $name;
28 28
         $this->type = $type;
29 29
     }
Please login to merge, or discard this patch.
src/Structural/Composite/Form.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\Composite;
6 6
 
7
-class Form implements RenderableInterface
8
-{
7
+class Form implements RenderableInterface
8
+{
9 9
     /**
10 10
      * @var string
11 11
      */
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
      * @param  string  $action
33 33
      * @param  string  $name
34 34
      */
35
-    public function __construct(string $action = '', string $name = '')
36
-    {
35
+    public function __construct(string $action = '', string $name = '')
36
+    {
37 37
         $this->action = $action;
38 38
         $this->name = $name;
39 39
     }
@@ -48,16 +48,16 @@  discard block
 block discarded – undo
48 48
         static $i = 0;
49 49
         $form = '';
50 50
 
51
-        if ($i === 0) {
51
+        if ($i === 0) {
52 52
             $form .= '<form action="%s" name="%s">';
53 53
         }
54 54
 
55
-        foreach ($this->elements as $element) {
55
+        foreach ($this->elements as $element) {
56 56
             $form .= $element->render();
57 57
             ++$i;
58 58
         }
59 59
 
60
-        if ($i === self::$elementNumber) {
60
+        if ($i === self::$elementNumber) {
61 61
             $form .= '</form>';
62 62
         }
63 63
 
Please login to merge, or discard this patch.
src/Structural/Composite/LabelElement.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace DesignPattern\Structural\Composite;
4 4
 
5
-class LabelElement implements RenderableInterface
6
-{
5
+class LabelElement implements RenderableInterface
6
+{
7 7
     /**
8 8
      * @var string
9 9
      */
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
      * @param  string  $for
21 21
      * @param  string  $name
22 22
      */
23
-    public function __construct(string $for, string $name = 'Label Name:')
24
-    {
23
+    public function __construct(string $for, string $name = 'Label Name:')
24
+    {
25 25
         $this->for = $for;
26 26
         $this->name = $name;
27 27
     }
Please login to merge, or discard this patch.
src/Behavioral/Specification/SpecificationInterface.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 namespace DesignPattern\Behavioral\Specification;
6 6
 
7
-interface SpecificationInterface
8
-{
7
+interface SpecificationInterface
8
+{
9 9
     /**
10 10
      * @param  Item  $item
11 11
      *
Please login to merge, or discard this patch.