Passed
Push — develop ( a2e445...3f2ff8 )
by nguereza
11:57
created
src/Tokenizer.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@  discard block
 block discarded – undo
56 56
  * @class Tokenizer
57 57
  * @package Platine\Expression
58 58
  */
59
-class Tokenizer
60
-{
59
+class Tokenizer {
61 60
     /**
62 61
      * List of token
63 62
      * @var array<Token>
@@ -111,8 +110,7 @@  discard block
 block discarded – undo
111 110
      * @param string $input
112 111
      * @param array<string, Operator> $operators
113 112
      */
114
-    public function __construct(string $input, array $operators)
115
-    {
113
+    public function __construct(string $input, array $operators) {
116 114
         $this->input = $input;
117 115
         $this->operators = $operators;
118 116
     }
Please login to merge, or discard this patch.
src/Executor.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
         $cacheKey = $expression;
121 121
         if (!array_key_exists($cacheKey, $this->caches)) {
122 122
             $tokens = (new Tokenizer($expression, $this->operators))
123
-                       ->tokenize()
124
-                       ->buildReversePolishNotation();
123
+                        ->tokenize()
124
+                        ->buildReversePolishNotation();
125 125
 
126 126
             if ($cache) {
127 127
                 $this->caches[$cacheKey] = $tokens;
@@ -456,8 +456,8 @@  discard block
 block discarded – undo
456 456
     protected function defaultVariables(): array
457 457
     {
458 458
         return [
459
-          'pi' => 3.14159265359,
460
-          'e' => 2.71828182846
459
+            'pi' => 3.14159265359,
460
+            'e' => 2.71828182846
461 461
         ];
462 462
     }
463 463
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
  * @class Executor
56 56
  * @package Platine\Expression
57 57
  */
58
-class Executor
59
-{
58
+class Executor {
60 59
     /**
61 60
      * The variable list
62 61
      * @var array<string, mixed>
@@ -96,16 +95,14 @@  discard block
 block discarded – undo
96 95
     /**
97 96
      * Create new instance
98 97
      */
99
-    public function __construct()
100
-    {
98
+    public function __construct() {
101 99
         $this->addDefaults();
102 100
     }
103 101
 
104 102
     /**
105 103
      * When do clone of this object
106 104
      */
107
-    public function __clone()
108
-    {
105
+    public function __clone() {
109 106
         $this->addDefaults();
110 107
     }
111 108
 
Please login to merge, or discard this patch.
src/Exception/ExpressionException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,6 +40,5 @@
 block discarded – undo
40 40
  * @class ExpressionException
41 41
  * @package Platine\Expression\Exception
42 42
  */
43
-class ExpressionException extends Exception
44
-{
43
+class ExpressionException extends Exception {
45 44
 }
Please login to merge, or discard this patch.
src/Exception/IncorrectFunctionParameterException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
38 38
  * @class IncorrectFunctionParameterException
39 39
  * @package Platine\Expression\Exception
40 40
  */
41
-class IncorrectFunctionParameterException extends ExpressionException
42
-{
41
+class IncorrectFunctionParameterException extends ExpressionException {
43 42
 }
Please login to merge, or discard this patch.
src/Exception/DivisionByZeroException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
38 38
  * @class DivisionByZeroException
39 39
  * @package Platine\Expression\Exception
40 40
  */
41
-class DivisionByZeroException extends ExpressionException
42
-{
41
+class DivisionByZeroException extends ExpressionException {
43 42
 }
Please login to merge, or discard this patch.
src/Exception/IncorrectBracketsException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
38 38
  * @class IncorrectBracketsException
39 39
  * @package Platine\Expression\Exception
40 40
  */
41
-class IncorrectBracketsException extends ExpressionException
42
-{
41
+class IncorrectBracketsException extends ExpressionException {
43 42
 }
Please login to merge, or discard this patch.
src/Exception/UnknownFunctionException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
38 38
  * @class UnknownFunctionException
39 39
  * @package Platine\Expression\Exception
40 40
  */
41
-class UnknownFunctionException extends ExpressionException
42
-{
41
+class UnknownFunctionException extends ExpressionException {
43 42
 }
Please login to merge, or discard this patch.
src/Exception/UnknownOperatorException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
38 38
  * @class UnknownOperatorException
39 39
  * @package Platine\Expression\Exception
40 40
  */
41
-class UnknownOperatorException extends ExpressionException
42
-{
41
+class UnknownOperatorException extends ExpressionException {
43 42
 }
Please login to merge, or discard this patch.
src/Exception/UnknownVariableException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
38 38
  * @class UnknownVariableException
39 39
  * @package Platine\Expression\Exception
40 40
  */
41
-class UnknownVariableException extends ExpressionException
42
-{
41
+class UnknownVariableException extends ExpressionException {
43 42
 }
Please login to merge, or discard this patch.