Test Failed
Push — master ( ef98d1...9f09c4 )
by Jinyun
02:13
created
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.