@@ -204,7 +204,7 @@ |
||
| 204 | 204 | //If is the SELECT query |
| 205 | 205 | $this->isSqlSELECTQuery = stristr($this->query, 'SELECT') !== false; |
| 206 | 206 | |
| 207 | - //if can use cache feature for this query |
|
| 207 | + //if can use cache feature for this query |
|
| 208 | 208 | $this->dbCacheStatus = get_config('cache_enable', false) && $this->cacheTtl > 0; |
| 209 | 209 | } |
| 210 | 210 | |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | if ($result) { |
| 223 | 223 | $this->insertId = $this->pdo->lastInsertId(); |
| 224 | 224 | //if the table doesn't have the auto increment field or sequence, the value of 0 will be returned |
| 225 | - $id = $this->insertId; |
|
| 225 | + $id = $this->insertId; |
|
| 226 | 226 | if (!$id) { |
| 227 | 227 | $id = true; |
| 228 | 228 | } |
@@ -440,9 +440,9 @@ discard block |
||
| 440 | 440 | $this->queryCount++; |
| 441 | 441 | |
| 442 | 442 | $queryResult = $this->queryRunner->setQuery($query) |
| 443 | - ->setReturnType($returnAsList) |
|
| 444 | - ->setReturnAsArray($returnAsArray) |
|
| 445 | - ->execute(); |
|
| 443 | + ->setReturnType($returnAsList) |
|
| 444 | + ->setReturnAsArray($returnAsArray) |
|
| 445 | + ->execute(); |
|
| 446 | 446 | |
| 447 | 447 | if (is_object($queryResult)) { |
| 448 | 448 | $this->result = $queryResult->getResult(); |
@@ -746,22 +746,22 @@ discard block |
||
| 746 | 746 | return $this->loaderInstance; |
| 747 | 747 | } |
| 748 | 748 | |
| 749 | - /** |
|
| 750 | - * Get the return type array or object |
|
| 751 | - * @return string|boolean |
|
| 752 | - */ |
|
| 749 | + /** |
|
| 750 | + * Get the return type array or object |
|
| 751 | + * @return string|boolean |
|
| 752 | + */ |
|
| 753 | 753 | protected function getReturnType(){ |
| 754 | 754 | $type = false; |
| 755 | 755 | if ($this->_temporary_return_type == 'array') { |
| 756 | - $type = 'array'; |
|
| 756 | + $type = 'array'; |
|
| 757 | 757 | } |
| 758 | 758 | return $type; |
| 759 | 759 | } |
| 760 | 760 | |
| 761 | - /** |
|
| 762 | - * Check if soft delete is enable setting the condition |
|
| 763 | - * @return object the current instance |
|
| 764 | - */ |
|
| 761 | + /** |
|
| 762 | + * Check if soft delete is enable setting the condition |
|
| 763 | + * @return object the current instance |
|
| 764 | + */ |
|
| 765 | 765 | protected function checkForSoftDelete(){ |
| 766 | 766 | if ($this->soft_delete && $this->_temporary_with_deleted !== true) { |
| 767 | 767 | $this->getQueryBuilder()->where($this->soft_delete_key, (bool) $this->_temporary_only_deleted); |
@@ -769,14 +769,14 @@ discard block |
||
| 769 | 769 | return $this; |
| 770 | 770 | } |
| 771 | 771 | |
| 772 | - /** |
|
| 773 | - * Relate for "belongs_to" and "has_many" |
|
| 774 | - * @param string $relationship the name of relation |
|
| 775 | - * @param string|array $options the model and primary key values |
|
| 776 | - * @param object|array $row the row to update |
|
| 777 | - * @param string $type the type can be "belongs_to", "has_many" |
|
| 778 | - * @return mixed the final row values |
|
| 779 | - */ |
|
| 772 | + /** |
|
| 773 | + * Relate for "belongs_to" and "has_many" |
|
| 774 | + * @param string $relationship the name of relation |
|
| 775 | + * @param string|array $options the model and primary key values |
|
| 776 | + * @param object|array $row the row to update |
|
| 777 | + * @param string $type the type can be "belongs_to", "has_many" |
|
| 778 | + * @return mixed the final row values |
|
| 779 | + */ |
|
| 780 | 780 | protected function relateBelongsToAndHasMany($relationship, $options, $row, $type){ |
| 781 | 781 | if (in_array($relationship, $this->_with)) { |
| 782 | 782 | $loaderInstance = $this->getLoaderInstanceOrCreate(); |
@@ -355,13 +355,13 @@ discard block |
||
| 355 | 355 | public function setMessage() { |
| 356 | 356 | $numArgs = func_num_args(); |
| 357 | 357 | if ($numArgs == 2) { |
| 358 | - foreach ($this->post(null) as $key => $val) { |
|
| 358 | + foreach ($this->post(null) as $key => $val) { |
|
| 359 | 359 | $this->_errorMsgOverrides[$key][func_get_arg(0)] = func_get_arg(1); |
| 360 | 360 | } |
| 361 | 361 | return true; |
| 362 | 362 | } else if ($numArgs == 3) { |
| 363 | 363 | $this->_errorMsgOverrides[func_get_arg(1)][func_get_arg(0)] = func_get_arg(2); |
| 364 | - return true; |
|
| 364 | + return true; |
|
| 365 | 365 | } |
| 366 | 366 | return false; |
| 367 | 367 | } |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | if (!empty($regexRule[0])) { |
| 469 | 469 | $ruleSets[] = $regexRule[0]; |
| 470 | 470 | } |
| 471 | - $ruleStringRegex = explode('|', $ruleStringTemp); |
|
| 471 | + $ruleStringRegex = explode('|', $ruleStringTemp); |
|
| 472 | 472 | foreach ($ruleStringRegex as $rule) { |
| 473 | 473 | $rule = trim($rule); |
| 474 | 474 | if ($rule) { |
@@ -315,7 +315,7 @@ |
||
| 315 | 315 | protected static function getDefaultFilePathForFunctionLanguage($file, $type, $appLang = null){ |
| 316 | 316 | $searchDir = null; |
| 317 | 317 | if ($type == 'function') { |
| 318 | - $searchDir = array(FUNCTIONS_PATH, CORE_FUNCTIONS_PATH); |
|
| 318 | + $searchDir = array(FUNCTIONS_PATH, CORE_FUNCTIONS_PATH); |
|
| 319 | 319 | } |
| 320 | 320 | else if ($type == 'language') { |
| 321 | 321 | $searchDir = array(APP_LANG_PATH, CORE_LANG_PATH); |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | self::$logger = $logger[0]; |
| 45 | 45 | } |
| 46 | 46 | if ($setLoggerName) { |
| 47 | - self::$logger->setLogger('Class::' . get_called_class()); |
|
| 47 | + self::$logger->setLogger('Class::' . get_called_class()); |
|
| 48 | 48 | } |
| 49 | 49 | return self::$logger; |
| 50 | 50 | } |
@@ -189,11 +189,11 @@ |
||
| 189 | 189 | */ |
| 190 | 190 | define('VAR_PATH', ROOT_PATH . 'var' . DS); |
| 191 | 191 | |
| 192 | - /** |
|
| 193 | - * The path to the directory of your cache files. |
|
| 194 | - * |
|
| 195 | - * This feature is available currently for database and views. |
|
| 196 | - */ |
|
| 192 | + /** |
|
| 193 | + * The path to the directory of your cache files. |
|
| 194 | + * |
|
| 195 | + * This feature is available currently for database and views. |
|
| 196 | + */ |
|
| 197 | 197 | define('CACHE_PATH', VAR_PATH . 'cache' . DS); |
| 198 | 198 | |
| 199 | 199 | /** |
@@ -160,15 +160,15 @@ |
||
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | /** |
| 163 | - * Return the server port using variable |
|
| 164 | - * |
|
| 165 | - * @codeCoverageIgnore |
|
| 166 | - * @return string |
|
| 167 | - */ |
|
| 163 | + * Return the server port using variable |
|
| 164 | + * |
|
| 165 | + * @codeCoverageIgnore |
|
| 166 | + * @return string |
|
| 167 | + */ |
|
| 168 | 168 | protected static function getServerPort() { |
| 169 | 169 | $serverPort = 80; |
| 170 | 170 | if (isset($_SERVER['SERVER_PORT'])) { |
| 171 | - $serverPort = $_SERVER['SERVER_PORT']; |
|
| 171 | + $serverPort = $_SERVER['SERVER_PORT']; |
|
| 172 | 172 | } |
| 173 | 173 | $port = ''; |
| 174 | 174 | if ((is_https() && $serverPort != 443) || (!is_https() && $serverPort != 80)) { |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | } |
| 283 | 283 | $filename = $this->encodeUtf8($this->filterOther((string) $filename)); |
| 284 | 284 | if (empty($data)) { |
| 285 | - $data = $this->getAttachmentData($path); |
|
| 285 | + $data = $this->getAttachmentData($path); |
|
| 286 | 286 | } |
| 287 | 287 | $this->_attachments[] = array( |
| 288 | 288 | 'path' => $path, |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | $addresses = array(); |
| 347 | 347 | foreach ($pairs as $name => $email) { |
| 348 | 348 | if (is_numeric($name)) { |
| 349 | - $name = null; |
|
| 349 | + $name = null; |
|
| 350 | 350 | } |
| 351 | 351 | $addresses[] = $this->formatHeader($email, $name); |
| 352 | 352 | } |