@@ -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 | |
@@ -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(); |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | $instance = $db; |
| 152 | 152 | } else { |
| 153 | 153 | $obj = & get_instance(); |
| 154 | - if (isset($obj->database)){ |
|
| 154 | + if (isset($obj->database)) { |
|
| 155 | 155 | /** |
| 156 | 156 | * NOTE: Need use "clone" because some Model need have the personal instance of the database library |
| 157 | 157 | * to prevent duplication |
@@ -730,7 +730,7 @@ discard block |
||
| 730 | 730 | * @return object |
| 731 | 731 | */ |
| 732 | 732 | protected function getLoaderInstanceOrCreate() { |
| 733 | - if (! is_object($this->loaderInstance)) { |
|
| 733 | + if (!is_object($this->loaderInstance)) { |
|
| 734 | 734 | $this->loaderInstance = & get_instance()->loader; |
| 735 | 735 | } |
| 736 | 736 | return $this->loaderInstance; |
@@ -740,7 +740,7 @@ discard block |
||
| 740 | 740 | * Get the return type array or object |
| 741 | 741 | * @return string|boolean |
| 742 | 742 | */ |
| 743 | - protected function getReturnType(){ |
|
| 743 | + protected function getReturnType() { |
|
| 744 | 744 | $type = false; |
| 745 | 745 | if ($this->_temporary_return_type == 'array') { |
| 746 | 746 | $type = 'array'; |
@@ -752,7 +752,7 @@ discard block |
||
| 752 | 752 | * Check if soft delete is enable setting the condition |
| 753 | 753 | * @return object the current instance |
| 754 | 754 | */ |
| 755 | - protected function checkForSoftDelete(){ |
|
| 755 | + protected function checkForSoftDelete() { |
|
| 756 | 756 | if ($this->soft_delete && $this->_temporary_with_deleted !== true) { |
| 757 | 757 | $this->getQueryBuilder()->where($this->soft_delete_key, (bool) $this->_temporary_only_deleted); |
| 758 | 758 | } |
@@ -767,12 +767,12 @@ discard block |
||
| 767 | 767 | * @param string $type the type can be "belongs_to", "has_many" |
| 768 | 768 | * @return mixed the final row values |
| 769 | 769 | */ |
| 770 | - protected function relateBelongsToAndHasMany($relationship, $options, $row, $type){ |
|
| 770 | + protected function relateBelongsToAndHasMany($relationship, $options, $row, $type) { |
|
| 771 | 771 | if (in_array($relationship, $this->_with)) { |
| 772 | 772 | $loaderInstance = $this->getLoaderInstanceOrCreate(); |
| 773 | 773 | $loaderInstance->model($options['model'], $relationship . '_model'); |
| 774 | 774 | |
| 775 | - if($type == 'belongs_to'){ |
|
| 775 | + if ($type == 'belongs_to') { |
|
| 776 | 776 | if (is_object($row)) { |
| 777 | 777 | $row->{$relationship} = $this->{$relationship . '_model'}->get($row->{$options['primary_key']}); |
| 778 | 778 | } else { |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | * @param string $appLang the application language, only if type = "language" |
| 313 | 313 | * @return string|null the full file path |
| 314 | 314 | */ |
| 315 | - protected static function getDefaultFilePathForFunctionLanguage($file, $type, $appLang = null){ |
|
| 315 | + protected static function getDefaultFilePathForFunctionLanguage($file, $type, $appLang = null) { |
|
| 316 | 316 | $searchDir = null; |
| 317 | 317 | if ($type == 'function') { |
| 318 | 318 | $searchDir = array(FUNCTIONS_PATH, CORE_FUNCTIONS_PATH); |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | * @param string|null $module the module if is not null will return it |
| 339 | 339 | * @return string|null |
| 340 | 340 | */ |
| 341 | - protected static function getModuleFromSuperController($module){ |
|
| 341 | + protected static function getModuleFromSuperController($module) { |
|
| 342 | 342 | $obj = & get_instance(); |
| 343 | 343 | if (!$module && !empty($obj->moduleName)) { |
| 344 | 344 | $module = $obj->moduleName; |
@@ -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 | } |
@@ -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 | */ |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | public function add($name) { |
| 67 | 67 | $logger = self::getLogger(); |
| 68 | 68 | if (in_array($name, self::$list)) { |
| 69 | - $logger->info('The module [' .$name. '] already added skipping.'); |
|
| 69 | + $logger->info('The module [' . $name . '] already added skipping.'); |
|
| 70 | 70 | return $this; |
| 71 | 71 | } |
| 72 | 72 | self::$list[] = $name; |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $logger->debug('Check if the application contains the modules ...'); |
| 41 | 41 | $dirList = glob(MODULE_PATH . '*', GLOB_ONLYDIR); |
| 42 | 42 | if ($dirList !== false) { |
| 43 | - self::$list = array_map('basename', $dirList); |
|
| 43 | + self::$list = array_map('basename', $dirList); |
|
| 44 | 44 | } |
| 45 | 45 | if (!empty(self::$list)) { |
| 46 | 46 | $logger->info('The application contains the module below [' . implode(', ', self::getModuleList()) . ']'); |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | public function add($name) { |
| 58 | 58 | $logger = self::getLogger(); |
| 59 | 59 | if (in_array($name, self::$list)) { |
| 60 | - $logger->info('The module [' .$name. '] already added skipping.'); |
|
| 61 | - return $this; |
|
| 60 | + $logger->info('The module [' .$name. '] already added skipping.'); |
|
| 61 | + return $this; |
|
| 62 | 62 | } |
| 63 | 63 | self::$list[] = $name; |
| 64 | 64 | return $this; |
@@ -88,10 +88,10 @@ discard block |
||
| 88 | 88 | self::$list = array(); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - /** |
|
| 92 | - * Get the list of module loaded |
|
| 93 | - * @return array the module list |
|
| 94 | - */ |
|
| 91 | + /** |
|
| 92 | + * Get the list of module loaded |
|
| 93 | + * @return array the module list |
|
| 94 | + */ |
|
| 95 | 95 | public static function getModuleList() { |
| 96 | 96 | return self::$list; |
| 97 | 97 | } |