Passed
Push — master ( 7b9bef...e624dc )
by Burak
01:36
created
class.sudoxu.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,14 +9,14 @@  discard block
 block discarded – undo
9 9
     private $limit,
10 10
             $sq,
11 11
             $chars,
12
-            $stack = array('1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
12
+            $stack = array('1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
13 13
 
14 14
     public function __construct($limit = 9)
15 15
     {
16 16
         ini_set('memory_limit', -1);
17 17
         set_time_limit(0);
18 18
 
19
-        ini_set('display_errors',1);
19
+        ini_set('display_errors', 1);
20 20
         error_reporting(E_ALL);
21 21
 
22 22
         $this->number = 0;
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     public function logic()
33 33
     {
34
-        if(count($this->stack) < $this->limit)
34
+        if (count($this->stack) < $this->limit)
35 35
         {
36 36
             echo 'error';
37 37
             exit;
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $row_temp = array();
123 123
         for ($x = 0; $x < $this->limit; $x++)
124 124
         {
125
-            if(!isset($this->sudoku[$row * $this->limit + $x]))
125
+            if (!isset($this->sudoku[$row * $this->limit + $x]))
126 126
             {
127 127
                 $this->sudoku[$row * $this->limit + $x] = null;
128 128
             }
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 
295 295
         $timing       = $this->microtime() - $start;
296 296
         $this->result = array(
297
-            'created_in' => round($timing,2),
297
+            'created_in' => round($timing, 2),
298 298
             'difficulty' => 'N/A'
299 299
         );
300 300
 
@@ -313,15 +313,15 @@  discard block
 block discarded – undo
313 313
 
314 314
     public function to($to)
315 315
     {
316
-        if($to == 'json')
316
+        if ($to == 'json')
317 317
         {
318 318
             return json_encode($this->array2export());
319 319
         }
320
-        else if($to == 'serialize')
320
+        else if ($to == 'serialize')
321 321
         {
322 322
             return serialize($this->array2export());
323 323
         }
324
-        else if($to == 'html')
324
+        else if ($to == 'html')
325 325
         {
326 326
             return serialize($this->array2export());
327 327
         }
@@ -361,8 +361,8 @@  discard block
 block discarded – undo
361 361
                 $string .= '<td
362 362
                             data-row="'.$u.'"
363 363
                             data-col="'.$v.'"
364
-                            style="border: 1px solid black;border-bottom:' . $border . 'px solid black;border-right:' . $border2 . 'px solid black;line-height: 50px; width: 50px; text-align: center; vertical-align: middle;">';
365
-                $string .=($this->sudoku[$v * $this->limit + $u]);
364
+                            style="border: 1px solid black;border-bottom:' . $border.'px solid black;border-right:'.$border2.'px solid black;line-height: 50px; width: 50px; text-align: center; vertical-align: middle;">';
365
+                $string .= ($this->sudoku[$v * $this->limit + $u]);
366 366
                 $string .= '</td>';
367 367
 
368 368
             }
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
         $string .= "</table>";
375 375
 
376 376
 
377
-        if($echo === true)
377
+        if ($echo === true)
378 378
         {
379 379
             echo $string;
380 380
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -316,12 +316,10 @@  discard block
 block discarded – undo
316 316
         if($to == 'json')
317 317
         {
318 318
             return json_encode($this->array2export());
319
-        }
320
-        else if($to == 'serialize')
319
+        } else if($to == 'serialize')
321 320
         {
322 321
             return serialize($this->array2export());
323
-        }
324
-        else if($to == 'html')
322
+        } else if($to == 'html')
325 323
         {
326 324
             return serialize($this->array2export());
327 325
         }
@@ -377,8 +375,7 @@  discard block
 block discarded – undo
377 375
         if($echo === true)
378 376
         {
379 377
             echo $string;
380
-        }
381
-        else
378
+        } else
382 379
         {
383 380
             return $string;
384 381
         }
Please login to merge, or discard this patch.