@@ -95,7 +95,7 @@ |
||
95 | 95 | list($originalWidth, $originalHeight) = $imageInfo; |
96 | 96 | |
97 | 97 | if ($originalWidth > $originalHeight) { |
98 | - $originalX = floor(($originalWidth - $originalHeight) / 2); |
|
98 | + $originalX = floor(($originalWidth-$originalHeight)/2); |
|
99 | 99 | $sourceWidth = $sourceHeight = $originalHeight; |
100 | 100 | } else { |
101 | 101 | $sourceWidth = $sourceHeight = $originalWidth; |
@@ -452,7 +452,7 @@ |
||
452 | 452 | } |
453 | 453 | |
454 | 454 | if ($vote_count > 0) { |
455 | - $score = $total_score / $vote_count; |
|
455 | + $score = $total_score/$vote_count; |
|
456 | 456 | } |
457 | 457 | |
458 | 458 | return sprintf('%01.2f', $score); |
@@ -174,7 +174,7 @@ |
||
174 | 174 | $this->set('sequence', 0); |
175 | 175 | } |
176 | 176 | |
177 | - $this->set('sequence', $this->get('sequence') + 1); |
|
177 | + $this->set('sequence', $this->get('sequence')+1); |
|
178 | 178 | $this->save(); |
179 | 179 | } |
180 | 180 |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | $URI = mb_substr($this->URI, 0, mb_strpos($this->URI, '?')); |
629 | 629 | |
630 | 630 | // let's take this opportunity to pass query string params to $this->params |
631 | - $queryString = mb_substr($this->URI, (mb_strpos($this->URI, '?') + 1)); |
|
631 | + $queryString = mb_substr($this->URI, (mb_strpos($this->URI, '?')+1)); |
|
632 | 632 | $this->queryString = $queryString; |
633 | 633 | parse_str($queryString, $this->params); |
634 | 634 | } else { |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | $name = $paramNames[$i]; |
643 | 643 | |
644 | 644 | if (!isset($this->params[trim($name, '{}')])) { |
645 | - if (isset($paramValues[$i]) && substr($name, 0, 1) == '{' && substr($name, strlen($name) - 1, 1) == '}') { |
|
645 | + if (isset($paramValues[$i]) && substr($name, 0, 1) == '{' && substr($name, strlen($name)-1, 1) == '}') { |
|
646 | 646 | $this->params[trim($name, '{}')] = $paramValues[$i]; |
647 | 647 | } |
648 | 648 | if (!isset($paramValues[$i]) && isset($defaultParams[trim($name, '{}')])) { |
@@ -207,7 +207,7 @@ |
||
207 | 207 | |
208 | 208 | if (isset($params['clearCache']) && $params['clearCache'] == 'true') { |
209 | 209 | try { |
210 | - FileUtils::deleteDirectoryContents($this->dataDir, array('.htaccess','html','images','pdf','xls')); |
|
210 | + FileUtils::deleteDirectoryContents($this->dataDir, array('.htaccess', 'html', 'images', 'pdf', 'xls')); |
|
211 | 211 | |
212 | 212 | $this->setStatusMessage(View::displayUpdateMessage('Cache contents deleted successfully.')); |
213 | 213 |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $config = ConfigProvider::getInstance(); |
200 | 200 | |
201 | 201 | // used to track when our pagination range ends |
202 | - $end = ($this->startPoint + $config->get('app.list.page.amount')); |
|
202 | + $end = ($this->startPoint+$config->get('app.list.page.amount')); |
|
203 | 203 | |
204 | 204 | $body = ''; |
205 | 205 | |
@@ -289,14 +289,14 @@ discard block |
||
289 | 289 | |
290 | 290 | $body = ''; |
291 | 291 | |
292 | - $end = ($this->startPoint + $config->get('app.list.page.amount')); |
|
292 | + $end = ($this->startPoint+$config->get('app.list.page.amount')); |
|
293 | 293 | |
294 | 294 | if ($end > $this->resultCount) { |
295 | 295 | $end = $this->resultCount; |
296 | 296 | } |
297 | 297 | |
298 | 298 | if ($this->resultCount > 0) { |
299 | - $body .= '<p align="center">Displaying '.($this->startPoint + 1).' to '.$end.' of <strong>'.$this->resultCount.'</strong>. '; |
|
299 | + $body .= '<p align="center">Displaying '.($this->startPoint+1).' to '.$end.' of <strong>'.$this->resultCount.'</strong>. '; |
|
300 | 300 | } else { |
301 | 301 | if (!empty($this->query)) { |
302 | 302 | $body .= View::displayUpdateMessage('There were no search results for your query.'); |
@@ -308,9 +308,9 @@ discard block |
||
308 | 308 | if ($this->startPoint > 0) { |
309 | 309 | // handle secure URLs |
310 | 310 | if (isset($params['tk'])) { |
311 | - $body .= '<li><a href="'.FrontController::generateSecureURL('act=Search&q='.$this->query.'&start='.($this->startPoint - $config->get('app.list.page.amount'))).'">«</a></li>'; |
|
311 | + $body .= '<li><a href="'.FrontController::generateSecureURL('act=Search&q='.$this->query.'&start='.($this->startPoint-$config->get('app.list.page.amount'))).'">«</a></li>'; |
|
312 | 312 | } else { |
313 | - $body .= '<li><a href="'.$config->get('app.url').'/search/'.$this->query.'/'.($this->startPoint - $config->get('app.list.page.amount')).'">«</a></li>'; |
|
313 | + $body .= '<li><a href="'.$config->get('app.url').'/search/'.$this->query.'/'.($this->startPoint-$config->get('app.list.page.amount')).'">«</a></li>'; |
|
314 | 314 | } |
315 | 315 | } elseif ($this->resultCount > $config->get('app.list.page.amount')) { |
316 | 316 | $body .= '<li class="disabled"><a href="#">«</a></li>'; |
@@ -336,9 +336,9 @@ discard block |
||
336 | 336 | if ($this->resultCount > $end) { |
337 | 337 | // handle secure URLs |
338 | 338 | if (isset($params['tk'])) { |
339 | - $body .= '<li><a href="'.FrontController::generateSecureURL('act=Search&q='.$this->query.'&start='.($this->startPoint + $config->get('app.list.page.amount'))).'">Next->></a></li>'; |
|
339 | + $body .= '<li><a href="'.FrontController::generateSecureURL('act=Search&q='.$this->query.'&start='.($this->startPoint+$config->get('app.list.page.amount'))).'">Next->></a></li>'; |
|
340 | 340 | } else { |
341 | - $body .= '<li><a href="'.$config->get('app.url').'/search/'.$this->query.'/'.($this->startPoint + $config->get('app.list.page.amount')).'">»</a></li>'; |
|
341 | + $body .= '<li><a href="'.$config->get('app.url').'/search/'.$this->query.'/'.($this->startPoint+$config->get('app.list.page.amount')).'">»</a></li>'; |
|
342 | 342 | } |
343 | 343 | } elseif ($this->resultCount > $config->get('app.list.page.amount')) { |
344 | 344 | $body .= '<li class="disabled"><a href="#">»</a></li>'; |
@@ -72,7 +72,7 @@ |
||
72 | 72 | $iv |
73 | 73 | ); |
74 | 74 | |
75 | - return $iv . $encryptedData; |
|
75 | + return $iv.$encryptedData; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -146,7 +146,7 @@ |
||
146 | 146 | clearstatcache(); |
147 | 147 | $size = filesize($this->path); |
148 | 148 | |
149 | - return ($size / 1024) /1024; |
|
149 | + return ($size/1024)/1024; |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |
@@ -629,15 +629,15 @@ |
||
629 | 629 | $unixTS = $this->getUnixValue(); |
630 | 630 | |
631 | 631 | if ($now > $unixTS) { |
632 | - $difference = $now - $unixTS; |
|
632 | + $difference = $now-$unixTS; |
|
633 | 633 | $tense = 'ago'; |
634 | 634 | } else { |
635 | - $difference = $unixTS - $now; |
|
635 | + $difference = $unixTS-$now; |
|
636 | 636 | $tense = 'from now'; |
637 | 637 | } |
638 | 638 | |
639 | - for ($i = 0; $difference >= $lengths[$i] && $i < count($lengths) - 1; ++$i) { |
|
640 | - $difference = round($difference / $lengths[$i]); |
|
639 | + for ($i = 0; $difference >= $lengths[$i] && $i < count($lengths)-1; ++$i) { |
|
640 | + $difference = round($difference/$lengths[$i]); |
|
641 | 641 | } |
642 | 642 | |
643 | 643 | $difference = round($difference); |