Passed
Push — master ( 39fb74...6e38c2 )
by Burak
02:03
created
src/Sudoxu/Sudoku.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
             $sq,
17 17
             $chars,
18 18
             $stack = [
19
-                '1','2','3','4','5','6','7','8','9',
20
-                '0','A','B','C','D','E','F','G','H',
21
-                'I','J','K','L','M','N','O','P','Q',
22
-                'R','S','T','U','V','W','X','Y','Z'
19
+                '1', '2', '3', '4', '5', '6', '7', '8', '9',
20
+                '0', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
21
+                'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q',
22
+                'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
23 23
             ];
24 24
 
25 25
     /**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     private function return_row($cell)
64 64
     {
65
-        return (int) floor($cell / $this->limit);
65
+        return (int)floor($cell / $this->limit);
66 66
     }
67 67
 
68 68
     /**
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     private function return_col($cell)
75 75
     {
76
-        return (int) $cell % $this->limit;
76
+        return (int)$cell % $this->limit;
77 77
     }
78 78
 
79 79
     /**
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     private function return_block($cell)
86 86
     {
87
-        return (int) floor($this->return_row($cell) / $this->sq) * $this->sq + floor($this->return_col($cell) / $this->sq);
87
+        return (int)floor($this->return_row($cell) / $this->sq) * $this->sq + floor($this->return_col($cell) / $this->sq);
88 88
     }
89 89
 
90 90
     /**
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $row_temp = array();
179 179
         for ($x = 0; $x < $this->limit; $x++)
180 180
         {
181
-            if(!isset($this->sudoku[$row * $this->limit + $x]))
181
+            if (!isset($this->sudoku[$row * $this->limit + $x]))
182 182
             {
183 183
                 $this->sudoku[$row * $this->limit + $x] = null;
184 184
             }
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
      */
380 380
     public function generate($to = 'json')
381 381
     {
382
-        $start     = $this->microtime();
382
+        $start = $this->microtime();
383 383
 
384 384
         $this->build();
385 385
 
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
                 $next_move    = array_pop($saved);
397 397
                 $this->sudoku = array_pop($saved_sud);
398 398
             } else {
399
-                $next_move    = (array) $scan;
399
+                $next_move    = (array)$scan;
400 400
             }
401 401
 
402 402
             $what_to_try = $this->next_random($next_move);
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 
414 414
         $timing       = $this->microtime() - $start;
415 415
         $this->result = array(
416
-            'created_in' => round($timing,2),
416
+            'created_in' => round($timing, 2),
417 417
             'timestamp'  => time(),
418 418
             'difficulty' => 'N/A'
419 419
         );
@@ -444,15 +444,15 @@  discard block
 block discarded – undo
444 444
     public function to($to)
445 445
     {
446 446
 
447
-        if($to == 'json')
447
+        if ($to == 'json')
448 448
         {
449 449
             return json_encode($this->array2export());
450 450
         }
451
-        else if($to == 'serialize')
451
+        else if ($to == 'serialize')
452 452
         {
453 453
             return serialize($this->array2export());
454 454
         }
455 455
         // else if($to == 'array')
456
-        return (array) $this->array2export();
456
+        return (array)$this->array2export();
457 457
     }
458 458
 }
459 459
\ No newline at end of file
Please login to merge, or discard this patch.