@@ -148,7 +148,7 @@ |
||
148 | 148 | static $cfg; |
149 | 149 | if (empty($cfg)) { |
150 | 150 | $cfg[0] = & load_configurations(); |
151 | - if(! is_array($cfg[0])){ |
|
151 | + if (!is_array($cfg[0])) { |
|
152 | 152 | $cfg[0] = array(); |
153 | 153 | } |
154 | 154 | } |
@@ -343,7 +343,7 @@ |
||
343 | 343 | * Get some parameters data need like ip address, hostname, browser info, etc. |
344 | 344 | * @return array |
345 | 345 | */ |
346 | - protected function getSessionDataParams(){ |
|
346 | + protected function getSessionDataParams() { |
|
347 | 347 | $this->getLoader()->functions('user_agent'); |
348 | 348 | $this->getLoader()->library('Browser'); |
349 | 349 |
@@ -142,7 +142,7 @@ |
||
142 | 142 | * @return string the final path after add suffix if configured |
143 | 143 | * otherwise the same value will be returned |
144 | 144 | */ |
145 | - protected static function addSuffixInPath($path){ |
|
145 | + protected static function addSuffixInPath($path) { |
|
146 | 146 | $suffix = get_config('url_suffix'); |
147 | 147 | if ($suffix && $path) { |
148 | 148 | if (strpos($path, '?') !== false) { |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | * |
347 | 347 | * @return string|null the full file path |
348 | 348 | */ |
349 | - protected static function getDefaultFilePathForView($file){ |
|
349 | + protected static function getDefaultFilePathForView($file) { |
|
350 | 350 | $searchDir = array(APPS_VIEWS_PATH, CORE_VIEWS_PATH); |
351 | 351 | $fullFilePath = null; |
352 | 352 | foreach ($searchDir as $dir) { |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | // Parse out the elapsed time and memory usage, |
466 | 466 | // then swap the pseudo-variables with the data |
467 | 467 | $elapsedTime = $benchmark->elapsedTime('APP_EXECUTION_START', 'APP_EXECUTION_END'); |
468 | - $memoryUsage = round($benchmark->memoryUsage('APP_EXECUTION_START', 'APP_EXECUTION_END') / 1024 / 1024, 6) . 'MB'; |
|
468 | + $memoryUsage = round($benchmark->memoryUsage('APP_EXECUTION_START', 'APP_EXECUTION_END') / 1024 / 1024, 6) . 'MB'; |
|
469 | 469 | return str_replace(array('{elapsed_time}', '{memory_usage}'), array($elapsedTime, $memoryUsage), $content); |
470 | 470 | } |
471 | 471 |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | * Set the file array data generally in constructor this is already set using $_FILES |
277 | 277 | * @param array $fileArray the new value |
278 | 278 | */ |
279 | - public function setFileArray($fileArray){ |
|
279 | + public function setFileArray($fileArray) { |
|
280 | 280 | $this->file_array = $fileArray; |
281 | 281 | } |
282 | 282 | |
@@ -594,7 +594,7 @@ discard block |
||
594 | 594 | * @return string |
595 | 595 | */ |
596 | 596 | public function getDestinationDirectory() { |
597 | - return $this->destination_directory ; |
|
597 | + return $this->destination_directory; |
|
598 | 598 | } |
599 | 599 | |
600 | 600 | /** |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | * @return boolean |
603 | 603 | */ |
604 | 604 | public function isAllowOverwriting() { |
605 | - return $this->overwrite_file ; |
|
605 | + return $this->overwrite_file; |
|
606 | 606 | } |
607 | 607 | |
608 | 608 | /** |
@@ -48,7 +48,7 @@ |
||
48 | 48 | * @link http://github.com/eoghanobrien/php-simple-mail |
49 | 49 | */ |
50 | 50 | |
51 | - class Email extends BaseClass{ |
|
51 | + class Email extends BaseClass { |
|
52 | 52 | /** |
53 | 53 | * @var int $_wrap |
54 | 54 | */ |
@@ -410,7 +410,7 @@ |
||
410 | 410 | * |
411 | 411 | * @return object|void |
412 | 412 | */ |
413 | - protected function setConnectionUsingConfigFile(){ |
|
413 | + protected function setConnectionUsingConfigFile() { |
|
414 | 414 | $dbConfigFromFile = $this->getDatabaseConfigFromFile(); |
415 | 415 | $connection = &class_loader('DatabaseConnection', 'classes/database'); |
416 | 416 | $connection->setConfig($dbConfigFromFile); |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | $_keys = array(); |
415 | 415 | foreach ($keys as $k => $v) { |
416 | 416 | $v = $this->checkForNullValue($v); |
417 | - if (! is_numeric($v)) { |
|
417 | + if (!is_numeric($v)) { |
|
418 | 418 | $v = $this->connection->escape($v, $escape); |
419 | 419 | } |
420 | 420 | $_keys[] = $v; |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | * |
728 | 728 | * @return string|null |
729 | 729 | */ |
730 | - protected function buildQueryPart($property, $command = ''){ |
|
730 | + protected function buildQueryPart($property, $command = '') { |
|
731 | 731 | if (!empty($this->{$property})) { |
732 | 732 | return $command . $this->{$property}; |
733 | 733 | } |
@@ -742,7 +742,7 @@ discard block |
||
742 | 742 | * @param string $clause the clause type "IS NULL", "IS NOT NULLs" |
743 | 743 | * @return object the current DatabaseQueryBuilder instance |
744 | 744 | */ |
745 | - protected function whereIsNullAndNotNull($field, $andOr = 'AND', $clause = 'IS NULL'){ |
|
745 | + protected function whereIsNullAndNotNull($field, $andOr = 'AND', $clause = 'IS NULL') { |
|
746 | 746 | if (is_array($field)) { |
747 | 747 | foreach ($field as $f) { |
748 | 748 | $this->whereIsNullAndNotNull($f, $andOr, $clause); |
@@ -760,7 +760,7 @@ discard block |
||
760 | 760 | * |
761 | 761 | * @return object the current instance |
762 | 762 | */ |
763 | - protected function setSelectStr($newSelect){ |
|
763 | + protected function setSelectStr($newSelect) { |
|
764 | 764 | $this->select = (($this->select == '*' || empty($this->select)) |
765 | 765 | ? $newSelect |
766 | 766 | : $this->select . ', ' . $newSelect); |
@@ -774,8 +774,8 @@ discard block |
||
774 | 774 | * @return string the empty string if the value is null |
775 | 775 | * otherwise the same value will be returned |
776 | 776 | */ |
777 | - protected function checkForNullValue($value){ |
|
778 | - if(is_null($value)){ |
|
777 | + protected function checkForNullValue($value) { |
|
778 | + if (is_null($value)) { |
|
779 | 779 | return ''; |
780 | 780 | } |
781 | 781 | return $value; |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | * @return object the current instance |
425 | 425 | */ |
426 | 426 | protected function filterValidationData() { |
427 | - foreach ($this->data as $key => $value ) { |
|
427 | + foreach ($this->data as $key => $value) { |
|
428 | 428 | if (is_array($value)) { |
429 | 429 | $this->data[$key] = array_map('trim', $value); |
430 | 430 | } else { |
@@ -1037,7 +1037,7 @@ discard block |
||
1037 | 1037 | if (call_user_func_array($paramValue, array($value)) === false) { |
1038 | 1038 | $this->setFieldErrorWithRequiredCheck($field, $value, $rule, $paramValue); |
1039 | 1039 | } |
1040 | - } else{ |
|
1040 | + } else { |
|
1041 | 1041 | $this->forceError = true; |
1042 | 1042 | show_error('The callback validation function/method "' . $paramValue . '" does not exist'); |
1043 | 1043 | } |