@@ -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; |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | function fix_input_quotes() |
4 | 4 | { |
5 | - if (get_magic_quotes_gpc ()) { |
|
5 | + if (get_magic_quotes_gpc()) { |
|
6 | 6 | array_stripslashes($_GET); |
7 | 7 | array_stripslashes($_POST); |
8 | 8 | array_stripslashes($_COOKIE); |
@@ -29,13 +29,13 @@ discard block |
||
29 | 29 | return trim(stripslashes(htmlentities($input, ENT_QUOTES, 'UTF-8'))); |
30 | 30 | } |
31 | 31 | |
32 | -function strToASCII( $str ) |
|
32 | +function strToASCII($str) |
|
33 | 33 | { |
34 | 34 | $trans = array( |
35 | - 'Š'=>'S', 'Ș'=>'S', 'š'=>'s', 'ș'=>'s', 'Ð'=>'Dj','Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Ă' => 'A', |
|
35 | + 'Š'=>'S', 'Ș'=>'S', 'š'=>'s', 'ș'=>'s', 'Ð'=>'Dj', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Ă' => 'A', |
|
36 | 36 | 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', |
37 | 37 | 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Ț' => 'T', |
38 | - 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss','à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'ă' => 'a', |
|
38 | + 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'ă' => 'a', |
|
39 | 39 | 'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', |
40 | 40 | 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', |
41 | 41 | 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y', 'ƒ'=>'f', 'ț' => 't'); |
@@ -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 | } |