Test Failed
Push — master ( ef98d1...9f09c4 )
by Jinyun
02:13
created
src/Creational/FactoryMethod/FoxconnFactory.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 
5 5
 namespace DesignPattern\Creational\FactoryMethod;
6 6
 
7
-class FoxconnFactory extends FactoryMethod
8
-{
7
+class FoxconnFactory extends FactoryMethod
8
+{
9 9
     /**
10 10
      * {@inheritdoc}
11 11
      *
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     public function createNotebook(string $brand): NotebookInterface
19 19
     {
20 20
         $brand = strtolower(trim($brand));
21
-        switch ((int) $brand) {
21
+        switch ((int) $brand) {
22 22
             case parent::LOW_CONFIG:
23 23
                 return new MacBookAir();
24 24
             case parent::MEDIUM_CONFIG:
Please login to merge, or discard this patch.
src/Creational/FactoryMethod/FactoryMethod.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\Creational\FactoryMethod;
6 6
 
7
-abstract class FactoryMethod
8
-{
7
+abstract class FactoryMethod
8
+{
9 9
     public const LOW_CONFIG = 1;
10 10
     public const MEDIUM_CONFIG = 2;
11 11
     public const HIGH_CONFIG = 3;
Please login to merge, or discard this patch.
src/Creational/FactoryMethod/MacBookPro.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\Creational\FactoryMethod;
6 6
 
7
-class MacBookPro implements NotebookInterface
8
-{
7
+class MacBookPro implements NotebookInterface
8
+{
9 9
     /**
10 10
      * @var string
11 11
      */
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @param string $color
18 18
      */
19
-    public function setColor(string $color)
20
-    {
19
+    public function setColor(string $color)
20
+    {
21 21
         $this->color = $color;
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Creational/Pool/StringReverseWorker.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\Creational\Pool;
6 6
 
7
-class StringReverseWorker
8
-{
7
+class StringReverseWorker
8
+{
9 9
     /**
10 10
      * @var \DateTime
11 11
      */
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
     /**
15 15
      * StringReverseWorker constructor.
16 16
      */
17
-    public function __construct()
18
-    {
17
+    public function __construct()
18
+    {
19 19
         $this->createdAt = new \DateTime();
20 20
     }
21 21
 
Please login to merge, or discard this patch.
src/Creational/Pool/Pool.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\Creational\Pool;
6 6
 
7
-class Pool implements \Countable
8
-{
7
+class Pool implements \Countable
8
+{
9 9
     /**
10 10
      * @var array StringReverseWorker[]
11 11
      */
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function get(): StringReverseWorker
25 25
     {
26
-        if (count($this->freeWorker) === 0) {
26
+        if (count($this->freeWorker) === 0) {
27 27
             $worker = new StringReverseWorker();
28
-        } else {
28
+        } else {
29 29
             $worker = array_pop($this->freeWorker);
30 30
         }
31 31
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     {
44 44
         $key = spl_object_hash($worker);
45 45
 
46
-        if (isset($this->usedWorker[$key])) {
46
+        if (isset($this->usedWorker[$key])) {
47 47
             unset($this->usedWorker[$key]);
48 48
             $this->freeWorker[$key] = $worker;
49 49
         }
Please login to merge, or discard this patch.
src/Creational/AbstractFactory/Image.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\Creational\AbstractFactory;
6 6
 
7
-abstract class Image implements RendererInterface
8
-{
7
+abstract class Image implements RendererInterface
8
+{
9 9
     /**
10 10
      * @var string
11 11
      */
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
      * @param string $path
23 23
      * @param string $title
24 24
      */
25
-    public function __construct(string $path, string $title = '')
26
-    {
25
+    public function __construct(string $path, string $title = '')
26
+    {
27 27
         $this->path = $path;
28 28
         $this->title = $title;
29 29
     }
Please login to merge, or discard this patch.
src/Creational/AbstractFactory/AbstractFactory.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\Creational\AbstractFactory;
6 6
 
7
-abstract class AbstractFactory
8
-{
7
+abstract class AbstractFactory
8
+{
9 9
     /**
10 10
      * Create a Image component.
11 11
      *
Please login to merge, or discard this patch.
src/Creational/AbstractFactory/HtmlFactory.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 use DesignPattern\Creational\AbstractFactory\Html\Image as HtmlImage;
8 8
 use DesignPattern\Creational\AbstractFactory\Html\Text as HtmlText;
9 9
 
10
-class HtmlFactory extends AbstractFactory
11
-{
10
+class HtmlFactory extends AbstractFactory
11
+{
12 12
     /**
13 13
      * Create a Image component implementation.
14 14
      *
Please login to merge, or discard this patch.
src/Creational/AbstractFactory/Text.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\Creational\AbstractFactory;
6 6
 
7
-abstract class Text implements RendererInterface
8
-{
7
+abstract class Text implements RendererInterface
8
+{
9 9
     /**
10 10
      * @var string
11 11
      */
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @param string $text
18 18
      */
19
-    public function __construct(string $text)
20
-    {
19
+    public function __construct(string $text)
20
+    {
21 21
         $this->text = $text;
22 22
     }
23 23
 }
Please login to merge, or discard this patch.