Completed
Branch master (37a6f7)
by Václav
05:19
created
src/FinanCalc.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,6 @@
 block discarded – undo
32 32
     use FinanCalc\Constants\ErrorMessages;
33 33
     use FinanCalc\Interfaces\Calculator\CalculatorFactoryAbstract;
34 34
     use FinanCalc\Utils\Config;
35
-    use FinanCalc\Calculators\Factories;
36 35
     use ReflectionClass;
37 36
     use ReflectionException;
38 37
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -94,10 +94,11 @@
 block discarded – undo
94 94
          * @throws Exception
95 95
          */
96 96
         public function getFactory($factoryClassName) {
97
-            if (array_key_exists($factoryClassName, $this->factoryClasses))
98
-                return $this->factoryClasses[$factoryClassName];
99
-            else
100
-                throw new Exception(ErrorMessages::getFactoryClassNotInitializedMessage($factoryClassName));
97
+            if (array_key_exists($factoryClassName, $this->factoryClasses)) {
98
+                            return $this->factoryClasses[$factoryClassName];
99
+            } else {
100
+                            throw new Exception(ErrorMessages::getFactoryClassNotInitializedMessage($factoryClassName));
101
+            }
101 102
         }
102 103
 
103 104
         /**
Please login to merge, or discard this patch.
src/Utils/Enum.php 1 patch
Braces   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,10 +31,11 @@  discard block
 block discarded – undo
31 31
          */
32 32
         public function setValue($value)
33 33
         {
34
-            if ($this->isValidEnumValue($value))
35
-                $this->value = $value;
36
-            else
37
-                throw new Exception(ErrorMessages::getInvalidTypeMessage());
34
+            if ($this->isValidEnumValue($value)) {
35
+                            $this->value = $value;
36
+            } else {
37
+                            throw new Exception(ErrorMessages::getInvalidTypeMessage());
38
+            }
38 39
         }
39 40
 
40 41
         /**
@@ -48,7 +49,9 @@  discard block
 block discarded – undo
48 49
             $reflector = new \ReflectionClass(get_class($this));
49 50
             foreach ($reflector->getConstants() as $validValue)
50 51
             {
51
-                if ($validValue == $checkValue) return true;
52
+                if ($validValue == $checkValue) {
53
+                    return true;
54
+                }
52 55
             }
53 56
             return false;
54 57
         }
Please login to merge, or discard this patch.