Passed
Branch master (76f5d0)
by Çağrı
03:40
created
src/Calculator/Quantity.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,12 @@
 block discarded – undo
8 8
     public function buyQuantityCalculator($maxFund, $price, $balance)
9 9
     {
10 10
         //calculate max fund based balance
11
-        if ($maxFund > 100) throw new \InvalidArgumentException('max_fund value can not be more than 100');
12
-        if ($maxFund < 1) throw new \InvalidArgumentException('max_fund value can not be less than 1');
11
+        if ($maxFund > 100) {
12
+            throw new \InvalidArgumentException('max_fund value can not be more than 100');
13
+        }
14
+        if ($maxFund < 1) {
15
+            throw new \InvalidArgumentException('max_fund value can not be less than 1');
16
+        }
13 17
 
14 18
         $buyFund = ($balance * $maxFund) / 100;
15 19
         return round($buyFund / $price, 8);
Please login to merge, or discard this patch.
src/Strategy/StrategyCalculator.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,9 +73,9 @@
 block discarded – undo
73 73
 
74 74
         if ($actionType->getType() == ActionInterface::TYPE_BUY) {
75 75
             $action = new BuyAction();
76
-        }elseif ( $actionType->getType() == ActionInterface::TYPE_SELL) {
76
+        } elseif ( $actionType->getType() == ActionInterface::TYPE_SELL) {
77 77
             $action = new SellAction();
78
-        }elseif ( $actionType->getType() == ActionInterface::TYPE_IDLE) {
78
+        } elseif ( $actionType->getType() == ActionInterface::TYPE_IDLE) {
79 79
             $action = new IdleAction();
80 80
         }
81 81
 
Please login to merge, or discard this patch.
src/Command/ReportCommand.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,9 @@
 block discarded – undo
35 35
     {
36 36
         try {
37 37
             $fs = new Filesystem();
38
-            if(!is_dir(__DIR__ . '/../../reports')) $fs->mkdir(__DIR__ . '/../../reports');
38
+            if(!is_dir(__DIR__ . '/../../reports')) {
39
+                $fs->mkdir(__DIR__ . '/../../reports');
40
+            }
39 41
 
40 42
             $reportDate = $input->getOption("date") ? $input->getOption("date") : (new \DateTime())->format('Y-m-d');
41 43
 
Please login to merge, or discard this patch.