Passed
Push — 1.0.0-dev ( 632010...3e5cd9 )
by nguereza
02:59
created
app/config/autoload.php 1 patch
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -25,103 +25,103 @@
 block discarded – undo
25 25
      */
26 26
 
27 27
     /**
28
-	* This file contains the configuration of resources that you want to load automatically: 
29
-	* personals or systems libraries, configuration files, models, languages
30
-	* personals functions or systems that are used often in your application 
31
-	* instead of loading them every time you want to use it.
32
-	* Note: loading a lot of resources can decrease the performance of your application.
33
-	*/
28
+     * This file contains the configuration of resources that you want to load automatically: 
29
+     * personals or systems libraries, configuration files, models, languages
30
+     * personals functions or systems that are used often in your application 
31
+     * instead of loading them every time you want to use it.
32
+     * Note: loading a lot of resources can decrease the performance of your application.
33
+     */
34 34
 
35 35
 
36
-	/**
37
-	* If you have personals libraries or systems to load automatically, then list them in the following array.
38
-	* For example :
39
-	*
40
-	*	$autoload['libraries'] = array('library1', 'library2');
41
-	*
42
-	* Using module:
43
-	* 
44
-	*   $autoload['libraries'] = array('module1/library1', 'module2/library1');
45
-	*
46
-	* Note: Systems libraries have priority over personals libraries, 
47
-	* ie the loading order is as follows: it looks in the folder of the systems libraries, 
48
-	* if it is found, it is loaded, if not, it search in the module directories, if it is found, 
49
-	* it is loaded, if not will search in personals libraries folder, 
50
-	* before returning an error in case it does not find it.
51
-	*/
36
+    /**
37
+     * If you have personals libraries or systems to load automatically, then list them in the following array.
38
+     * For example :
39
+     *
40
+     *	$autoload['libraries'] = array('library1', 'library2');
41
+     *
42
+     * Using module:
43
+     * 
44
+     *   $autoload['libraries'] = array('module1/library1', 'module2/library1');
45
+     *
46
+     * Note: Systems libraries have priority over personals libraries, 
47
+     * ie the loading order is as follows: it looks in the folder of the systems libraries, 
48
+     * if it is found, it is loaded, if not, it search in the module directories, if it is found, 
49
+     * it is loaded, if not will search in personals libraries folder, 
50
+     * before returning an error in case it does not find it.
51
+     */
52 52
     $autoload['libraries'] = array();
53 53
 
54 54
     /**
55
-	* If you have configuration files to load automatically, then list them in the following array.
56
-	* For example :
57
-	*
58
-	*	$autoload['config'] = array('config1', 'config2');
59
-	*
60
-	* Using module:
61
-	* 
62
-	*   $autoload['config'] = array('module1/config1', 'module2/config2');
63
-	*
64
-	* Note 1: the file name must have as prefix "config_" for config file inside CONFIG_PATH folder
65
-	* for example "config_name_of_the_file_config.php" and contains as configuration variable the array $config,
66
-	* otherwise the system can not find this configuration file.
67
-	* For example :
68
-	*
69
-	*	$config['key1'] = value1;
70
-	* 	$config['key2'] = value2;
71
-	*
72
-	* Note 2: the files to be loaded must be in the folder defined by the constant "CONFIG_PATH" in "index.php".
73
-	* or inside the "config" of your application modules
74
-	*/
55
+     * If you have configuration files to load automatically, then list them in the following array.
56
+     * For example :
57
+     *
58
+     *	$autoload['config'] = array('config1', 'config2');
59
+     *
60
+     * Using module:
61
+     * 
62
+     *   $autoload['config'] = array('module1/config1', 'module2/config2');
63
+     *
64
+     * Note 1: the file name must have as prefix "config_" for config file inside CONFIG_PATH folder
65
+     * for example "config_name_of_the_file_config.php" and contains as configuration variable the array $config,
66
+     * otherwise the system can not find this configuration file.
67
+     * For example :
68
+     *
69
+     *	$config['key1'] = value1;
70
+     * 	$config['key2'] = value2;
71
+     *
72
+     * Note 2: the files to be loaded must be in the folder defined by the constant "CONFIG_PATH" in "index.php".
73
+     * or inside the "config" of your application modules
74
+     */
75 75
     $autoload['config'] = array();
76 76
 
77 77
     /**
78
-	* If you have models to load automatically, then list them in the following array.
79
-	* For example :
80
-	*
81
-	*	$autoload['models'] = array('model1', 'model2');
82
-	*
83
-	* Using module:
84
-	* 
85
-	*   $autoload['models'] = array('module1/model1', 'module2/model2');
86
-	*/
78
+     * If you have models to load automatically, then list them in the following array.
79
+     * For example :
80
+     *
81
+     *	$autoload['models'] = array('model1', 'model2');
82
+     *
83
+     * Using module:
84
+     * 
85
+     *   $autoload['models'] = array('module1/model1', 'module2/model2');
86
+     */
87 87
     $autoload['models'] = array();
88 88
 
89 89
     /**
90
-	* If you have systems or personals functions to load automatically, specify them in the following array.
91
-	* For example :
92
-	*
93
-	* 	$autoload['functions'] = array('function1', 'function2');
94
-	*
95
-	* Using module:
96
-	* 
97
-	*   $autoload['functions'] = array('module1/function1', 'module2/function2');
98
-	*
99
-	* Note 1: Personal functions have priority over system functions,
100
-	* that is to say that the order of loading is the following : it looks in the directory of the modules functions, 
101
-	* if it is found, it is loaded, otherwise, it looks in the directory of the personal functions,
102
-	* if it is found, it is loaded, otherwise, it looks in the directory of the system functions,
103
-	* before returning an error in case he does not find it.
104
-	*
105
-	* Note 2: the file name must have as prefix "function_" for example "function_foo.php" then
106
-	* will use:
107
-	* 
108
-	*  $autoload['functions'] = array('foo');
109
-	*/
90
+     * If you have systems or personals functions to load automatically, specify them in the following array.
91
+     * For example :
92
+     *
93
+     * 	$autoload['functions'] = array('function1', 'function2');
94
+     *
95
+     * Using module:
96
+     * 
97
+     *   $autoload['functions'] = array('module1/function1', 'module2/function2');
98
+     *
99
+     * Note 1: Personal functions have priority over system functions,
100
+     * that is to say that the order of loading is the following : it looks in the directory of the modules functions, 
101
+     * if it is found, it is loaded, otherwise, it looks in the directory of the personal functions,
102
+     * if it is found, it is loaded, otherwise, it looks in the directory of the system functions,
103
+     * before returning an error in case he does not find it.
104
+     *
105
+     * Note 2: the file name must have as prefix "function_" for example "function_foo.php" then
106
+     * will use:
107
+     * 
108
+     *  $autoload['functions'] = array('foo');
109
+     */
110 110
     $autoload['functions'] = array();
111 111
 	
112 112
     /**
113
-	* If you have systems or personals languages to load automatically, specify them in the following array.
114
-	* For example :
115
-	*
116
-	* 	$autoload['languages'] = array('lang1', 'lang2');
117
-	*
118
-	* Using module:
119
-	* 
120
-	*   $autoload['languages'] = array('module1/lang1', 'module2/lang2');
121
-	*
122
-	* Note: the file name must have as prefix "lang_" for example "lang_foo.php" then
123
-	* will use:
124
-	* 
125
-	*  $autoload['languages'] = array('foo');
126
-	*/
113
+     * If you have systems or personals languages to load automatically, specify them in the following array.
114
+     * For example :
115
+     *
116
+     * 	$autoload['languages'] = array('lang1', 'lang2');
117
+     *
118
+     * Using module:
119
+     * 
120
+     *   $autoload['languages'] = array('module1/lang1', 'module2/lang2');
121
+     *
122
+     * Note: the file name must have as prefix "lang_" for example "lang_foo.php" then
123
+     * will use:
124
+     * 
125
+     *  $autoload['languages'] = array('foo');
126
+     */
127 127
     $autoload['languages'] = array();
Please login to merge, or discard this patch.
app/views/home.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@
 block discarded – undo
34 34
             <p>Author : <b><?php echo TNH_AUTHOR; ?></b></p>
35 35
             <p>Author E-mail : <b><?php echo TNH_AUTHOR_EMAIL; ?></b></p>
36 36
             <hr />
37
-            <p>Current controller: <b class = "text-muted label-danger"><?php echo APPS_CONTROLLER_PATH . 'Home.php';?></b>
38
-            <p>Current view: <b class = "text-muted label-danger"><?php echo APPS_VIEWS_PATH . 'home.php';?></b>
37
+            <p>Current controller: <b class = "text-muted label-danger"><?php echo APPS_CONTROLLER_PATH . 'Home.php'; ?></b>
38
+            <p>Current view: <b class = "text-muted label-danger"><?php echo APPS_VIEWS_PATH . 'home.php'; ?></b>
39 39
           </div>
40 40
         </div>
41 41
       </div>
Please login to merge, or discard this patch.
core/classes/Url.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
core/classes/Request.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -262,24 +262,24 @@
 block discarded – undo
262 262
             return $this;
263 263
         }
264 264
 
265
-         /**
266
-         * Return the instance of session.
267
-         * @return object the session instance
268
-         */
265
+            /**
266
+             * Return the instance of session.
267
+             * @return object the session instance
268
+             */
269 269
         public function getSession() {
270 270
             return $this->session;
271 271
         }
272 272
 
273
-         /**
274
-         * Set the value for $_GET, $_POST, $_SERVER etc. if the key is an array will
275
-         * set the current super variable value by this.
276
-         * @param string $type the type can be "post", "get", etc.
277
-         * @param  string|array  $key the item key to be set or array if need set the current global variable 
278
-         * by this value
279
-         * @param mixed $value the value to set if $key is not an array
280
-         *
281
-         * @return object       the current instance
282
-         */
273
+            /**
274
+             * Set the value for $_GET, $_POST, $_SERVER etc. if the key is an array will
275
+             * set the current super variable value by this.
276
+             * @param string $type the type can be "post", "get", etc.
277
+             * @param  string|array  $key the item key to be set or array if need set the current global variable 
278
+             * by this value
279
+             * @param mixed $value the value to set if $key is not an array
280
+             *
281
+             * @return object       the current instance
282
+             */
283 283
         protected function setVars($type, $key, $value = null) {
284 284
             if (is_array($key)) {
285 285
                 //set all
Please login to merge, or discard this patch.
core/classes/model/Model.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 {
Please login to merge, or discard this patch.