Passed
Push — master ( 176859...c887a4 )
by Mohammed
10:45 queued 08:44
created
src/helpers/Validation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
     {
9 9
         if (is_numeric($this->parsed_number)) {
10 10
             return $this;
11
-        } else {
11
+        }else {
12 12
             die('is not right number ');
13 13
         }
14 14
     }
Please login to merge, or discard this patch.
src/helpers/Calculators.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
     public function classB($arr, $len = 2)
15 15
     {
16
-        if ($this->before_comma_len >= 2) {
16
+        if ($this->before_comma_len>=2) {
17 17
             $ten_number_index = $this->before_comma_len - 2;
18 18
             $single_number_index = $this->before_comma_len - 1;
19 19
             $detecd_array = [
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
                 $this->before_comma_array[$single_number_index],
22 22
             ];
23 23
             if ($arr == $detecd_array) {
24
-                if ($arr[0] == 0 and $arr[1] >= 1 and $arr[1] <= 10) {
24
+                if ($arr[0] == 0 and $arr[1]>=1 and $arr[1]<=10) {
25 25
                     $this->is_main1_currency = true;
26
-                } elseif ($arr[0] >= 1 and $arr[1] >= 1 and $arr[1] <= 9) {
26
+                } elseif ($arr[0]>=1 and $arr[1]>=1 and $arr[1]<=9) {
27 27
                     $this->is_main1_currency = false;
28
-                } elseif ($arr[0] >= 2) {
28
+                } elseif ($arr[0]>=2) {
29 29
                     $this->is_main1_currency = false;
30 30
                 }
31 31
             }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             return $this->tens[$arr[0]];
52 52
         }
53 53
 
54
-        if ($arr[0] > 1) {
54
+        if ($arr[0]>1) {
55 55
             return $this->ones[$arr[1]].$this->config['connection_tool'].$this->tens[$arr[0]];
56 56
         }
57 57
 
@@ -91,9 +91,9 @@  discard block
 block discarded – undo
91 91
     {
92 92
         $classC = [$arr[1], $arr[2], $arr[3]];
93 93
 
94
-        if ($arr[0] <= 2) {
94
+        if ($arr[0]<=2) {
95 95
             $thousands = $this->thousands[$arr[0]];
96
-        } else {
96
+        }else {
97 97
             $thousands = $this->ones[$arr[0]].' '.$this->thousands['39'];
98 98
         }
99 99
 
@@ -111,13 +111,13 @@  discard block
 block discarded – undo
111 111
         if ($arr[0] != 0) {
112 112
             $conn = ' ';
113 113
 
114
-            if ($arr[1] >= 2 and $arr[0] > 1) {
114
+            if ($arr[1]>=2 and $arr[0]>1) {
115 115
                 $conn = $this->config['connection_tool'];
116 116
             }
117 117
 
118 118
             if (in_array($arr[1], [2, 1])) {
119 119
                 $thousands = $this->others[$arr[1]].$conn.$this->tens[$arr[0]];
120
-            } else {
120
+            }else {
121 121
                 $thousands = $this->ones[$arr[1]].$conn.$this->tens[$arr[0]];
122 122
             }
123 123
 
@@ -125,21 +125,21 @@  discard block
 block discarded – undo
125 125
                 if ($arr[0] == 1) {
126 126
                     $thousands = $this->ones[10];
127 127
                     $thousands .= ' '.$this->thousands[39];
128
-                } else {
128
+                }else {
129 129
                     $thousands = $this->tens[$arr[0]];
130 130
                     $thousands .= ' '.$this->thousands[1];
131 131
                 }
132
-            } else {
132
+            }else {
133 133
                 if ($arr[2] == 0 and $arr[3] == 0 and $arr[4] == 0) {
134 134
                     $thousands .= ' '.$this->thousands[1];
135
-                } else {
135
+                }else {
136 136
                     $thousands .= ' '.$this->thousands[1199];
137 137
                 }
138 138
             }
139
-        } else {
139
+        }else {
140 140
             if (in_array($arr[1], [2, 1])) {
141 141
                 $thousands = $this->others[$arr[1]].' ';
142
-            } else {
142
+            }else {
143 143
                 $thousands = $this->ones[$arr[1]].' ';
144 144
             }
145 145
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         if ($arr[0] != 0) {
163 163
             if ($arr[1] == 0 && $arr[2] == 0) {
164 164
                 $thousands = $this->hundreds[$arr[0]].' '.$this->thousands[1];
165
-            } else {
165
+            }else {
166 166
                 if ($arr[1] == 0) {
167 167
                     $thousands = $this->hundreds[$arr[0]].$this->config['connection_tool'].
168 168
                         $this->ones[$arr[2]].' '.$this->thousands[1];
@@ -170,24 +170,24 @@  discard block
 block discarded – undo
170 170
                     if ($arr[3] == 0 and $arr[4] == 0 and $arr[5] == 0) {
171 171
                         $thousands = $this->hundreds[$arr[0]].$this->config['connection_tool'].
172 172
                             $this->tens[$arr[1]].' '.$this->thousands[1];
173
-                    } else {
173
+                    }else {
174 174
                         $thousands = $this->hundreds[$arr[0]].$this->config['connection_tool'].
175 175
                             $this->tens[$arr[1]].' '.$this->thousands[1199];
176 176
                     }
177
-                } else {
177
+                }else {
178 178
 //                    $thousands_lang = $this->thousands[1199];
179
-                    if ($arr[1] == 0 and $arr[2] >= 1 and $arr[1] <= 10) {
179
+                    if ($arr[1] == 0 and $arr[2]>=1 and $arr[1]<=10) {
180 180
                         $thousands_lang = $this->thousands[1];
181
-                    } elseif ($arr[1] >= 1 and $arr[2] >= 1 and $arr[1] <= 9) {
181
+                    } elseif ($arr[1]>=1 and $arr[2]>=1 and $arr[1]<=9) {
182 182
                         $thousands_lang = $this->thousands[1199];
183
-                    } elseif ($arr[1] >= 2) {
183
+                    } elseif ($arr[1]>=2) {
184 184
                         $thousands_lang = $this->thousands[1199];
185 185
                     }
186 186
 
187 187
                     $thousands = $this->classC([$arr[0], $arr[1], $arr[2]], 3).' '.$thousands_lang;
188 188
                 }
189 189
             }
190
-        } else {
190
+        }else {
191 191
             return $this->classE([$arr[1], $arr[2], $arr[3], $arr[4], $arr[5]]);
192 192
         }
193 193
 
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
         //$classC = [$arr[1],$arr[2],$arr[3]];
205 205
         $classE = [$arr[1], $arr[2], $arr[3], $arr[4], $arr[5], $arr[6]];
206 206
 
207
-        if ($arr[0] <= 2) {
207
+        if ($arr[0]<=2) {
208 208
             $million = $this->millions[$arr[0]];
209
-        } else {
209
+        }else {
210 210
             $million = $this->ones[$arr[0]].' '.$this->millions['39'];
211 211
         }
212 212
 
@@ -234,13 +234,13 @@  discard block
 block discarded – undo
234 234
         if ($arr[0] != 0) {
235 235
             $conn = ' ';
236 236
 
237
-            if ($arr[1] >= 2 and $arr[0] > 1) {
237
+            if ($arr[1]>=2 and $arr[0]>1) {
238 238
                 $conn = $this->config['connection_tool'];
239 239
             }
240 240
 
241 241
             if (in_array($arr[1], [2, 1])) {
242 242
                 $million = $this->others[$arr[1]].$conn.$this->tens[$arr[0]];
243
-            } else {
243
+            }else {
244 244
                 $million = $this->ones[$arr[1]].$conn.$this->tens[$arr[0]];
245 245
             }
246 246
 
@@ -248,21 +248,21 @@  discard block
 block discarded – undo
248 248
                 if ($arr[0] == 1) {
249 249
                     $million = $this->ones[10];
250 250
                     $million .= ' '.$this->millions[39];
251
-                } else {
251
+                }else {
252 252
                     $million = $this->tens[$arr[0]];
253 253
                     $million .= ' '.$this->millions[1];
254 254
                 }
255
-            } else {
255
+            }else {
256 256
                 if ($arr[2] == 0 and $arr[3] == 0 and $arr[4] == 0) {
257 257
                     $million .= ' '.$this->millions[1];
258
-                } else {
258
+                }else {
259 259
                     $million .= ' '.$this->millions[1199];
260 260
                 }
261 261
             }
262
-        } else {
262
+        }else {
263 263
             if (in_array($arr[1], [2, 1])) {
264 264
                 $million = $this->others[$arr[1]].' ';
265
-            } else {
265
+            }else {
266 266
                 $million = $this->ones[$arr[1]].' ';
267 267
             }
268 268
 
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 
296 296
         if (in_array($arr[1], [2])) {
297 297
             $million = $this->others[$arr[1]].$this->config['connection_tool'].$this->tens[$arr[0]];
298
-        } else {
298
+        }else {
299 299
             $million = $this->ones[$arr[1]].$this->config['connection_tool'].$this->tens[$arr[0]];
300 300
         }
301 301
 
Please login to merge, or discard this patch.
src/helpers/Handler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@
 block discarded – undo
30 30
 
31 31
     private function split_numbers_after_comma_to_array()
32 32
     {
33
-        if ($this->all_numbers_len >= 2) {
33
+        if ($this->all_numbers_len>=2) {
34 34
             $arr = str_split($this->parsed_number_array[1]);
35 35
 
36
-            if (count($arr) >= 3) {
36
+            if (count($arr)>=3) {
37 37
                 $this->after_comma_array = [$arr[0], $arr[1]];
38
-            } else {
38
+            }else {
39 39
                 $this->after_comma_array = $arr;
40 40
             }
41 41
 
Please login to merge, or discard this patch.
src/Tafqeet.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -107,16 +107,16 @@
 block discarded – undo
107 107
 
108 108
             if ($this->is_main1_currency) {
109 109
                 $result .= $this->result_before_comma.' '.$this->config['currencies'][$currency]['main1'];
110
-            } else {
110
+            }else {
111 111
                 $result .= $this->result_before_comma.' '.$this->config['currencies'][$currency]['main2'];
112 112
             }
113
-            if ($this->after_comma_len >= 1 && $this->after_comma_sum != 00) {
113
+            if ($this->after_comma_len>=1 && $this->after_comma_sum != 00) {
114 114
                 if (in_array($this->after_comma_sum, [
115 115
                     3, 4, 5, 6, 7, 8, 9, 10,
116 116
                 ])) {
117 117
                     $result .= $this->config['connection_tool'].$this->result_after_comma.' '.
118 118
                         $this->config['currencies'][$currency]['multi'];
119
-                } else {
119
+                }else {
120 120
                     $result .= $this->config['connection_tool'].$this->result_after_comma.' '.
121 121
                         $this->config['currencies'][$currency]['single'];
122 122
                 }
Please login to merge, or discard this patch.