@@ -16,10 +16,10 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | |
412 | 412 | $timing = $this->microtime() - $start; |
413 | 413 | $this->result = array( |
414 | - 'created_in' => round($timing,2), |
|
414 | + 'created_in' => round($timing, 2), |
|
415 | 415 | 'timestamp' => time(), |
416 | 416 | 'difficulty' => 'N/A' |
417 | 417 | ); |
@@ -442,15 +442,15 @@ discard block |
||
442 | 442 | public function to($to) |
443 | 443 | { |
444 | 444 | |
445 | - if($to == 'json') |
|
445 | + if ($to == 'json') |
|
446 | 446 | { |
447 | 447 | return json_encode($this->array2export()); |
448 | 448 | } |
449 | - else if($to == 'serialize') |
|
449 | + else if ($to == 'serialize') |
|
450 | 450 | { |
451 | 451 | return serialize($this->array2export()); |
452 | 452 | } |
453 | 453 | // else if($to == 'array') |
454 | - return (array) $this->array2export(); |
|
454 | + return (array)$this->array2export(); |
|
455 | 455 | } |
456 | 456 | } |
457 | 457 | \ No newline at end of file |
@@ -445,8 +445,7 @@ |
||
445 | 445 | if($to == 'json') |
446 | 446 | { |
447 | 447 | return json_encode($this->array2export()); |
448 | - } |
|
449 | - else if($to == 'serialize') |
|
448 | + } else if($to == 'serialize') |
|
450 | 449 | { |
451 | 450 | return serialize($this->array2export()); |
452 | 451 | } |