@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | $minutes = false; |
8 | 8 | if (strpos($time, ':')) { |
9 | 9 | list($hours, $minutes) = explode(':', $time); |
10 | - $minutes += $hours*60; |
|
10 | + $minutes += $hours * 60; |
|
11 | 11 | } |
12 | 12 | return $minutes; |
13 | 13 | } |
@@ -15,21 +15,21 @@ discard block |
||
15 | 15 | public function secondsInStringTime($seconds) |
16 | 16 | { |
17 | 17 | if ($days = intval((floor($seconds / 86400)))) { |
18 | - $seconds = $seconds - $days*86400; |
|
19 | - $return .= ($return ? ' ' : '') . str_pad($days, 2, 0,STR_PAD_LEFT).'d'; |
|
18 | + $seconds = $seconds - $days * 86400; |
|
19 | + $return .= ($return ? ' ' : '') . str_pad($days, 2, 0, STR_PAD_LEFT) . 'd'; |
|
20 | 20 | } |
21 | 21 | if ($hours = intval((floor($seconds / 3600))) OR $return) { |
22 | - $seconds = $seconds - $hours*3600; |
|
23 | - $return .= ($return ? ' ' : '') . str_pad($hours, 2, 0,STR_PAD_LEFT).'h'; |
|
22 | + $seconds = $seconds - $hours * 3600; |
|
23 | + $return .= ($return ? ' ' : '') . str_pad($hours, 2, 0, STR_PAD_LEFT) . 'h'; |
|
24 | 24 | } |
25 | 25 | if ($minutes = intval((floor($seconds / 60))) OR $return) { |
26 | - $seconds = $seconds - $minutes*60; |
|
27 | - $return .= ($return ? ' ' : '') . str_pad($minutes, 2, 0, STR_PAD_LEFT).'m'; |
|
26 | + $seconds = $seconds - $minutes * 60; |
|
27 | + $return .= ($return ? ' ' : '') . str_pad($minutes, 2, 0, STR_PAD_LEFT) . 'm'; |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | $seconds = round($seconds, 2); |
31 | 31 | if ($seconds) { |
32 | - $return .= ($return ? ' ' : '') . str_pad($seconds, 2, 0, STR_PAD_LEFT).'s'; |
|
32 | + $return .= ($return ? ' ' : '') . str_pad($seconds, 2, 0, STR_PAD_LEFT) . 's'; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | return $return; |
@@ -22,9 +22,9 @@ |
||
22 | 22 | |
23 | 23 | $dDiff = $dStart->diff($dEnd); |
24 | 24 | |
25 | - $years = (int)$dDiff->format("%y"); |
|
26 | - $months = (int)$dDiff->format("%m"); |
|
27 | - $days = (int)$dDiff->format("%d"); |
|
25 | + $years = (int) $dDiff->format("%y"); |
|
26 | + $months = (int) $dDiff->format("%m"); |
|
27 | + $days = (int) $dDiff->format("%d"); |
|
28 | 28 | |
29 | 29 | return array($years, $months, $days); |
30 | 30 | } |
@@ -19,25 +19,25 @@ |
||
19 | 19 | switch ($mode) { |
20 | 20 | case "any": |
21 | 21 | foreach ($keywords as $item) { |
22 | - $return .= $this->matchNumbers($item).'* '; |
|
22 | + $return .= $this->matchNumbers($item) . '* '; |
|
23 | 23 | } |
24 | 24 | break; |
25 | 25 | |
26 | 26 | case "all": |
27 | 27 | if (count($keywords) == 1) { |
28 | - $return .= $this->matchNumbers(reset($keywords)).'* '; |
|
28 | + $return .= $this->matchNumbers(reset($keywords)) . '* '; |
|
29 | 29 | } else { |
30 | 30 | foreach ($keywords as $item) { |
31 | - $return .= '+'. $this->matchNumbers($item).'* '; |
|
31 | + $return .= '+' . $this->matchNumbers($item) . '* '; |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
35 | 35 | break; |
36 | 36 | case "exact": |
37 | 37 | foreach ($keywords as $item) { |
38 | - $return .= $this->matchNumbers($item).' '; |
|
38 | + $return .= $this->matchNumbers($item) . ' '; |
|
39 | 39 | } |
40 | - $return = '+"'.$return.'"'; |
|
40 | + $return = '+"' . $return . '"'; |
|
41 | 41 | break; |
42 | 42 | } |
43 | 43 |
@@ -2,7 +2,7 @@ |
||
2 | 2 | class Nip_Helper_Async extends Nip\Helpers\AbstractHelper |
3 | 3 | { |
4 | 4 | |
5 | - public function sendMessage($message, $type = 'success', $format ='json') |
|
5 | + public function sendMessage($message, $type = 'success', $format = 'json') |
|
6 | 6 | { |
7 | 7 | $data = array( |
8 | 8 | 'type' => $type, |
@@ -17,9 +17,9 @@ |
||
17 | 17 | |
18 | 18 | |
19 | 19 | public function __construct($id, $content, $title = false) { |
20 | - $this->_id = $id; |
|
21 | - $this->_content = $content; |
|
22 | - $this->_title = $title; |
|
20 | + $this->_id = $id; |
|
21 | + $this->_content = $content; |
|
22 | + $this->_title = $title; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 |
@@ -14,7 +14,7 @@ |
||
14 | 14 | while ($len < $maxlen && pow($base, $len) < $num) |
15 | 15 | $len++; |
16 | 16 | if ($len >= $maxlen) |
17 | - throw new Exception($num." out of range (max ".pow($base, $maxlen - 1).")"); |
|
17 | + throw new Exception($num . " out of range (max " . pow($base, $maxlen - 1) . ")"); |
|
18 | 18 | $ceil = pow($base, $len); |
19 | 19 | $prime = $gp[$len]; |
20 | 20 | $dechash = ($num * $prime) % $ceil; |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | public function getTotalPages() |
30 | 30 | { |
31 | - $this->totalPages = (int)($this->count / $this->itemsPerPage); |
|
31 | + $this->totalPages = (int) ($this->count / $this->itemsPerPage); |
|
32 | 32 | if ($this->count % $this->itemsPerPage != 0) { |
33 | 33 | $this->totalPages++; |
34 | 34 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | public function __construct() { |
21 | 21 | } |
22 | 22 | |
23 | - public function __call($name, $arguments) { |
|
23 | + public function __call($name, $arguments) { |
|
24 | 24 | if (strpos($name, 'render') === 0) { |
25 | 25 | return call_user_func_array(array($this->getProvider(), $name), $arguments); |
26 | 26 | } |
@@ -19,12 +19,12 @@ |
||
19 | 19 | } |
20 | 20 | |
21 | 21 | public function setDraggable($draggable = true) { |
22 | - $this->setParam('draggable',(bool) $draggable); |
|
22 | + $this->setParam('draggable', (bool) $draggable); |
|
23 | 23 | return $this; |
24 | 24 | } |
25 | 25 | |
26 | 26 | public function moveOnClick($move = true) { |
27 | - $this->setParam('moveOnClick',(bool) $move); |
|
27 | + $this->setParam('moveOnClick', (bool) $move); |
|
28 | 28 | return $this; |
29 | 29 | } |
30 | 30 |