Passed
Push — 1.0.0-dev ( 93958a...e1c8ef )
by nguereza
02:26
created
classes/views/home.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
     <meta name="description" content="A simple PHP framework using HMVC architecture">
9 9
     <meta name="author" content="Tony NGUEREZA">
10 10
     <title>TNH Framework</title>
11
-    <link href="<?php echo Assets::css('bootstrap.min');?>" rel="stylesheet" type = "text/css" >
12
-	<link href="<?php echo Assets::css('font-awesome.min');?>" rel="stylesheet" type = "text/css" >
13
-    <link href="<?php echo Assets::css('responsive');?>" rel="stylesheet" type = "text/css" >
14
-	<link rel="icon" href="<?php echo Assets::img('favicon.ico');?>">
11
+    <link href="<?php echo Assets::css('bootstrap.min'); ?>" rel="stylesheet" type = "text/css" >
12
+	<link href="<?php echo Assets::css('font-awesome.min'); ?>" rel="stylesheet" type = "text/css" >
13
+    <link href="<?php echo Assets::css('responsive'); ?>" rel="stylesheet" type = "text/css" >
14
+	<link rel="icon" href="<?php echo Assets::img('favicon.ico'); ?>">
15 15
 	<!--[if lt IE 9]>
16
-	<script src="<?php echo Assets::js('html5shiv');?>"></script>
17
-	<script src="<?php echo Assets::js('respond.min');?>"></script>
16
+	<script src="<?php echo Assets::js('html5shiv'); ?>"></script>
17
+	<script src="<?php echo Assets::js('respond.min'); ?>"></script>
18 18
     <![endif]-->
19 19
 	<style type = "text/css">
20 20
 		
@@ -28,15 +28,15 @@  discard block
 block discarded – undo
28 28
 			<div class = "col-md-offset-2 col-md-8 col-md-offset-2">
29 29
 				<div class = "panel panel-primary">
30 30
 					<div class = "panel-heading">
31
-						<h2>Welcome on <?php echo TNH_NAME;?> v<?php echo TNH_VERSION;?></h2>
31
+						<h2>Welcome on <?php echo TNH_NAME; ?> v<?php echo TNH_VERSION; ?></h2>
32 32
 					</div>
33 33
 					<div class = "panel-body">
34
-						<img src = "<?php echo Assets::img('logo.png');?>" class = "img-responsive" style = "float:left;" />
34
+						<img src = "<?php echo Assets::img('logo.png'); ?>" class = "img-responsive" style = "float:left;" />
35 35
 						<h3>
36 36
 							A simple PHP framework using HMVC architecture
37 37
 						</h3>
38 38
 						<br />
39
-						<p><?php echo Html::a('https://github.com/tnhfw/tnh-fw', 'Framework on Github', array('class' => 'btn btn-default', 'target' => '_blank'));?></p>
39
+						<p><?php echo Html::a('https://github.com/tnhfw/tnh-fw', 'Framework on Github', array('class' => 'btn btn-default', 'target' => '_blank')); ?></p>
40 40
 					</div>
41 41
 				</div>
42 42
 				<div class = "panel panel-primary">
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
 						<h2>Server information</h2>
45 45
 					</div>
46 46
 					<div class = "panel-body">
47
-						<h4>Running on : <b><?php echo php_uname();?></b></h4>
48
-						<h4>PHP server SAPI : <b><?php echo php_sapi_name();?></b></h4>
49
-						<h4>PHP Version : <b><?php echo phpversion();?></b></h4>
50
-						<h4>PHP Loaded extensions : (<?php echo count(get_loaded_extensions());?> extensions)</h4>
47
+						<h4>Running on : <b><?php echo php_uname(); ?></b></h4>
48
+						<h4>PHP server SAPI : <b><?php echo php_sapi_name(); ?></b></h4>
49
+						<h4>PHP Version : <b><?php echo phpversion(); ?></b></h4>
50
+						<h4>PHP Loaded extensions : (<?php echo count(get_loaded_extensions()); ?> extensions)</h4>
51 51
 							<table class = "table table-striped table-condensed table-bordered table-responsive">
52 52
 								<tr>
53 53
 									<th>Name</th>
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
 								</tr>
56 56
 								<?php foreach (get_loaded_extensions() as $e):?>
57 57
 									<tr>
58
-										<td><?php echo $e;?></td>
59
-										<td><?php echo phpversion($e);?></td>
58
+										<td><?php echo $e; ?></td>
59
+										<td><?php echo phpversion($e); ?></td>
60 60
 									</tr>
61
-								<?php endforeach;?>
61
+								<?php endforeach; ?>
62 62
 							</table>
63 63
 					</div>
64 64
 				</div>
@@ -67,30 +67,30 @@  discard block
 block discarded – undo
67 67
 						<h2>Framework information</h2>
68 68
 					</div>
69 69
 					<div class = "panel-body">
70
-						<h4>Version : <b><?php echo TNH_VERSION;?></b></h4>
71
-						<h4>Required PHP version : <b>PHP >= <?php echo TNH_REQUIRED_PHP_MIN_VERSION;?>, PHP <= <?php echo TNH_REQUIRED_PHP_MAX_VERSION;?></b></h4>
72
-						<h4>Build date : <b><?php echo TNH_RELEASE_DATE;?></b></h4>
73
-						<h4>Author : <b><?php echo TNH_AUTHOR;?></b></h4>
74
-						<h4>Author E-mail : <b><?php echo TNH_AUTHOR_EMAIL;?></b></h4>
75
-						<h4>Loaded files : (<?php echo count(get_included_files());?> files)</h4>
70
+						<h4>Version : <b><?php echo TNH_VERSION; ?></b></h4>
71
+						<h4>Required PHP version : <b>PHP >= <?php echo TNH_REQUIRED_PHP_MIN_VERSION; ?>, PHP <= <?php echo TNH_REQUIRED_PHP_MAX_VERSION; ?></b></h4>
72
+						<h4>Build date : <b><?php echo TNH_RELEASE_DATE; ?></b></h4>
73
+						<h4>Author : <b><?php echo TNH_AUTHOR; ?></b></h4>
74
+						<h4>Author E-mail : <b><?php echo TNH_AUTHOR_EMAIL; ?></b></h4>
75
+						<h4>Loaded files : (<?php echo count(get_included_files()); ?> files)</h4>
76 76
 							<table class = "table table-striped table-condensed table-bordered table-responsive">
77 77
 								<tr>
78 78
 									<th>Path</th>
79 79
 									<th>File</th>
80 80
 								</tr>
81
-								<?php foreach(get_included_files() as $file):?>
81
+								<?php foreach (get_included_files() as $file):?>
82 82
 									<tr>
83
-										<td><?php echo $file;?></td>
84
-										<td><?php echo basename($file);?></td>
83
+										<td><?php echo $file; ?></td>
84
+										<td><?php echo basename($file); ?></td>
85 85
 									</tr>
86
-								<?php endforeach;?>
86
+								<?php endforeach; ?>
87 87
 							</table>
88 88
 					</div>
89 89
 				</div>
90 90
 			</div>
91 91
 		</div>
92 92
 	</div>
93
-	<script src="<?php echo Assets::js('jquery');?>"></script>
94
-	<script src="<?php echo Assets::js('bootstrap.min');?>"></script>
93
+	<script src="<?php echo Assets::js('jquery'); ?>"></script>
94
+	<script src="<?php echo Assets::js('bootstrap.min'); ?>"></script>
95 95
 	</body>
96 96
 </html>
Please login to merge, or discard this patch.
index.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -243,7 +243,7 @@
 block discarded – undo
243 243
 			if (version_compare(PHP_VERSION, '5.3', '>=')) {
244 244
 				error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
245 245
 			}
246
-			else{
246
+			else {
247 247
 				error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE);
248 248
 			}
249 249
 		break;
Please login to merge, or discard this patch.
Indentation   +235 added lines, -235 removed lines patch added patch discarded remove patch
@@ -1,267 +1,267 @@
 block discarded – undo
1 1
 <?php
2
-	/**
3
-	 * TNH Framework
4
-	 *
5
-	 * A simple PHP framework using HMVC architecture
6
-	 *
7
-	 * This content is released under the GNU GPL License (GPL)
8
-	 *
9
-	 * Copyright (C) 2017 Tony NGUEREZA
10
-	 *
11
-	 * This program is free software; you can redistribute it and/or
12
-	 * modify it under the terms of the GNU General Public License
13
-	 * as published by the Free Software Foundation; either version 3
14
-	 * of the License, or (at your option) any later version.
15
-	 *
16
-	 * This program is distributed in the hope that it will be useful,
17
-	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
-	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
-	 * GNU General Public License for more details.
20
-	 *
21
-	 * You should have received a copy of the GNU General Public License
22
-	 * along with this program; if not, write to the Free Software
23
-	 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24
-	*/
2
+    /**
3
+     * TNH Framework
4
+     *
5
+     * A simple PHP framework using HMVC architecture
6
+     *
7
+     * This content is released under the GNU GPL License (GPL)
8
+     *
9
+     * Copyright (C) 2017 Tony NGUEREZA
10
+     *
11
+     * This program is free software; you can redistribute it and/or
12
+     * modify it under the terms of the GNU General Public License
13
+     * as published by the Free Software Foundation; either version 3
14
+     * of the License, or (at your option) any later version.
15
+     *
16
+     * This program is distributed in the hope that it will be useful,
17
+     * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
+     * GNU General Public License for more details.
20
+     *
21
+     * You should have received a copy of the GNU General Public License
22
+     * along with this program; if not, write to the Free Software
23
+     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24
+     */
25 25
 
26
-	/**
27
-	* the directory separator, under windows it is \ and unix, linux /
28
-	*/
29
-	define('DS', DIRECTORY_SEPARATOR);
26
+    /**
27
+     * the directory separator, under windows it is \ and unix, linux /
28
+     */
29
+    define('DS', DIRECTORY_SEPARATOR);
30 30
 
31
-	/**
32
-	* The root directory of the application.
33
-	*
34
-	* you can place this directory outside of your web directory, for example "/home/your_app", etc.
35
-	*/
36
-	define('ROOT_PATH', dirname(realpath(__FILE__)) . DS);
31
+    /**
32
+     * The root directory of the application.
33
+     *
34
+     * you can place this directory outside of your web directory, for example "/home/your_app", etc.
35
+     */
36
+    define('ROOT_PATH', dirname(realpath(__FILE__)) . DS);
37 37
 
38
-	/**
39
-	* The path to the directory.
40
-	*
41
-	* That contains your static files (javascript, css, images, etc.)
42
-	* Note: the path must be relative to the file index.php (the front-end controller).
43
-	*/
44
-	define('ASSETS_PATH', 'assets/');
38
+    /**
39
+     * The path to the directory.
40
+     *
41
+     * That contains your static files (javascript, css, images, etc.)
42
+     * Note: the path must be relative to the file index.php (the front-end controller).
43
+     */
44
+    define('ASSETS_PATH', 'assets/');
45 45
 
46
-	/**
47
-	* The path to the directory of your cache files.
48
-	*
49
-	* This feature is available currently for database and views.
50
-	*/
51
-	define('CACHE_PATH', ROOT_PATH . 'cache' . DS);
46
+    /**
47
+     * The path to the directory of your cache files.
48
+     *
49
+     * This feature is available currently for database and views.
50
+     */
51
+    define('CACHE_PATH', ROOT_PATH . 'cache' . DS);
52 52
 
53
-	/**
54
-	* The path to the application directory. 
55
-	*
56
-	* It contains your most often used files that is to say which contains your files of the application, 
57
-	* in MVC architecture (controllers, models, views).
58
-	*/
59
-	define('APPS_PATH', ROOT_PATH . 'classes' . DS);
53
+    /**
54
+     * The path to the application directory. 
55
+     *
56
+     * It contains your most often used files that is to say which contains your files of the application, 
57
+     * in MVC architecture (controllers, models, views).
58
+     */
59
+    define('APPS_PATH', ROOT_PATH . 'classes' . DS);
60 60
 
61
-	/**
62
-	* The path to the controller directory of your application.
63
-	*
64
-	* If you already know the MVC architecture you know what a controller means; 
65
-	* it is he who makes the business logic of your application in general.
66
-	*/
67
-	define('APPS_CONTROLLER_PATH', APPS_PATH . 'controllers' . DS);
61
+    /**
62
+     * The path to the controller directory of your application.
63
+     *
64
+     * If you already know the MVC architecture you know what a controller means; 
65
+     * it is he who makes the business logic of your application in general.
66
+     */
67
+    define('APPS_CONTROLLER_PATH', APPS_PATH . 'controllers' . DS);
68 68
 
69
-	/**
70
-	* The path to the directory of your model classes of your application. 
71
-	*
72
-	* If you already know the MVC architecture you know what a model means; 
73
-	* it's the one who interacts with the database, in one word persistent data from your application.
74
-	*/
75
-	define('APPS_MODEL_PATH', APPS_PATH . 'models' . DS);
69
+    /**
70
+     * The path to the directory of your model classes of your application. 
71
+     *
72
+     * If you already know the MVC architecture you know what a model means; 
73
+     * it's the one who interacts with the database, in one word persistent data from your application.
74
+     */
75
+    define('APPS_MODEL_PATH', APPS_PATH . 'models' . DS);
76 76
 
77
-	/**
78
-	* The path to the directory of your views.
79
-	*
80
-	* If you already know the MVC architecture you know what a view means, 
81
-	* a view is just a user interface (html page, form, etc.) that is to say 
82
-	* everything displayed in the browser interface, etc.
83
-	*/
84
-	define('APPS_VIEWS_PATH', APPS_PATH . 'views' . DS);
77
+    /**
78
+     * The path to the directory of your views.
79
+     *
80
+     * If you already know the MVC architecture you know what a view means, 
81
+     * a view is just a user interface (html page, form, etc.) that is to say 
82
+     * everything displayed in the browser interface, etc.
83
+     */
84
+    define('APPS_VIEWS_PATH', APPS_PATH . 'views' . DS);
85 85
 
86
-	/**
87
-	* The path to the configuration directory.
88
-	*
89
-	* That contains most of the configuration files for your 
90
-	* application (database, class loading file, functions, etc.)
91
-	*/
92
-	define('CONFIG_PATH', ROOT_PATH . 'config' . DS);
86
+    /**
87
+     * The path to the configuration directory.
88
+     *
89
+     * That contains most of the configuration files for your 
90
+     * application (database, class loading file, functions, etc.)
91
+     */
92
+    define('CONFIG_PATH', ROOT_PATH . 'config' . DS);
93 93
 
94
-	/** 
95
-	* The core directory
96
-	*
97
-	* It is recommended to put this folder out of the web directory of your server and 
98
-	* you should not change its content because in case of update you could lose the modified files.
99
-	*/
100
-	define('CORE_PATH', ROOT_PATH . 'core' . DS);
94
+    /** 
95
+     * The core directory
96
+     *
97
+     * It is recommended to put this folder out of the web directory of your server and 
98
+     * you should not change its content because in case of update you could lose the modified files.
99
+     */
100
+    define('CORE_PATH', ROOT_PATH . 'core' . DS);
101 101
 	
102
-	/**
103
-	* The path to the directory of core classes that used by the system.
104
-	*
105
-	* It contains PHP classes that are used by the framework internally.
106
-	*/
107
-	define('CORE_CLASSES_PATH', CORE_PATH . 'classes' . DS);
102
+    /**
103
+     * The path to the directory of core classes that used by the system.
104
+     *
105
+     * It contains PHP classes that are used by the framework internally.
106
+     */
107
+    define('CORE_CLASSES_PATH', CORE_PATH . 'classes' . DS);
108 108
 	
109
-	/**
110
-	* The path to the directory of core classes for the cache used by the system.
111
-	*
112
-	* It contains PHP classes for the cache drivers.
113
-	*/
114
-	define('CORE_CLASSES_CACHE_PATH', CORE_CLASSES_PATH . 'cache' . DS);
109
+    /**
110
+     * The path to the directory of core classes for the cache used by the system.
111
+     *
112
+     * It contains PHP classes for the cache drivers.
113
+     */
114
+    define('CORE_CLASSES_CACHE_PATH', CORE_CLASSES_PATH . 'cache' . DS);
115 115
 	
116 116
     /**
117
-	* The path to the directory of core classes for the database used by the system.
118
-	*
119
-	* It contains PHP classes for the database library, drivers, etc.
120
-	*/
121
-	define('CORE_CLASSES_DATABASE_PATH', CORE_CLASSES_PATH . 'database' . DS);
117
+     * The path to the directory of core classes for the database used by the system.
118
+     *
119
+     * It contains PHP classes for the database library, drivers, etc.
120
+     */
121
+    define('CORE_CLASSES_DATABASE_PATH', CORE_CLASSES_PATH . 'database' . DS);
122 122
     
123
-	/**
124
-	* The path to the directory of core classes for the model used by the system.
125
-	*
126
-	* It contains PHP classes for the models.
127
-	*/
128
-	define('CORE_CLASSES_MODEL_PATH', CORE_CLASSES_PATH . 'model' . DS);
123
+    /**
124
+     * The path to the directory of core classes for the model used by the system.
125
+     *
126
+     * It contains PHP classes for the models.
127
+     */
128
+    define('CORE_CLASSES_MODEL_PATH', CORE_CLASSES_PATH . 'model' . DS);
129 129
 
130
-	/**
131
-	* The path to the directory of functions or helper systems.
132
-	*
133
-	* It contains PHP functions that perform a particular task: character string processing, URL, etc.
134
-	*/
135
-	define('CORE_FUNCTIONS_PATH', CORE_PATH . 'functions' . DS);
130
+    /**
131
+     * The path to the directory of functions or helper systems.
132
+     *
133
+     * It contains PHP functions that perform a particular task: character string processing, URL, etc.
134
+     */
135
+    define('CORE_FUNCTIONS_PATH', CORE_PATH . 'functions' . DS);
136 136
 
137
-	/**
138
-	* The path to the core directory of languages files. 
139
-	*
140
-	*/
141
-	define('CORE_LANG_PATH', CORE_PATH . 'lang' . DS);
137
+    /**
138
+     * The path to the core directory of languages files. 
139
+     *
140
+     */
141
+    define('CORE_LANG_PATH', CORE_PATH . 'lang' . DS);
142 142
 
143
-	/**
144
-	* The path to the system library directory.
145
-	*
146
-	* Which contains the libraries most often used in your web application, as for the 
147
-	* core directory it is advisable to put it out of the root directory of your application.
148
-	*/
149
-	define('CORE_LIBRARY_PATH', CORE_PATH . 'libraries' . DS);
143
+    /**
144
+     * The path to the system library directory.
145
+     *
146
+     * Which contains the libraries most often used in your web application, as for the 
147
+     * core directory it is advisable to put it out of the root directory of your application.
148
+     */
149
+    define('CORE_LIBRARY_PATH', CORE_PATH . 'libraries' . DS);
150 150
 
151
-	/**
152
-	* The path to the system view directory.
153
-	*
154
-	* That contains the views used for the system, such as error messages, and so on.
155
-	*/
156
-	define('CORE_VIEWS_PATH', CORE_PATH . 'views' . DS);
151
+    /**
152
+     * The path to the system view directory.
153
+     *
154
+     * That contains the views used for the system, such as error messages, and so on.
155
+     */
156
+    define('CORE_VIEWS_PATH', CORE_PATH . 'views' . DS);
157 157
 	
158
-	/**
159
-	* The path to the directory of your PHP personal functions or helper.
160
-	*
161
-	* It contains your PHP functions that perform a particular task: utilities, etc.
162
-	* Note: Do not put your personal functions or helpers in the system functions directory, 
163
-	* because if you update the system you may lose them.
164
-	*/
165
-	define('FUNCTIONS_PATH', ROOT_PATH . 'functions' . DS);
158
+    /**
159
+     * The path to the directory of your PHP personal functions or helper.
160
+     *
161
+     * It contains your PHP functions that perform a particular task: utilities, etc.
162
+     * Note: Do not put your personal functions or helpers in the system functions directory, 
163
+     * because if you update the system you may lose them.
164
+     */
165
+    define('FUNCTIONS_PATH', ROOT_PATH . 'functions' . DS);
166 166
 
167
-	/**
168
-	* The path to the app directory of personal language. 
169
-	*
170
-	* This feature is not yet available. 
171
-	* You can help us do this if you are nice or wish to see the developed framework.
172
-	*/
173
-	define('APP_LANG_PATH', ROOT_PATH . 'lang' . DS);
167
+    /**
168
+     * The path to the app directory of personal language. 
169
+     *
170
+     * This feature is not yet available. 
171
+     * You can help us do this if you are nice or wish to see the developed framework.
172
+     */
173
+    define('APP_LANG_PATH', ROOT_PATH . 'lang' . DS);
174 174
 
175
-	/**
176
-	* The path to the directory of your personal libraries
177
-	*
178
-	* It contains your PHP classes, package, etc.
179
-	* Note: you should not put your personal libraries in the system library directory, 
180
-	* because it is recalled in case of updating the system you might have surprises.
181
-	*/
182
-	define('LIBRARY_PATH', ROOT_PATH . 'libraries' . DS);
175
+    /**
176
+     * The path to the directory of your personal libraries
177
+     *
178
+     * It contains your PHP classes, package, etc.
179
+     * Note: you should not put your personal libraries in the system library directory, 
180
+     * because it is recalled in case of updating the system you might have surprises.
181
+     */
182
+    define('LIBRARY_PATH', ROOT_PATH . 'libraries' . DS);
183 183
 
184
-	/**
185
-	* The path to the directory that contains the log files.
186
-	*
187
-	* Note: This directory must be available in writing and if possible must have as owner the user who launches your web server, 
188
-	* under unix or linux most often with the apache web server it is "www-data" or "httpd" even "nobody" for more
189
-	* details see the documentation of your web server.
190
-	* Example for Unix or linux with apache web server:
191
-	* # chmod -R 700 /path/to/your/logs/directory/
192
-	* # chown -R www-data:www-data /path/to/your/logs/directory/
193
-	*/
194
-	define('LOGS_PATH', ROOT_PATH . 'logs' . DS);
184
+    /**
185
+     * The path to the directory that contains the log files.
186
+     *
187
+     * Note: This directory must be available in writing and if possible must have as owner the user who launches your web server, 
188
+     * under unix or linux most often with the apache web server it is "www-data" or "httpd" even "nobody" for more
189
+     * details see the documentation of your web server.
190
+     * Example for Unix or linux with apache web server:
191
+     * # chmod -R 700 /path/to/your/logs/directory/
192
+     * # chown -R www-data:www-data /path/to/your/logs/directory/
193
+     */
194
+    define('LOGS_PATH', ROOT_PATH . 'logs' . DS);
195 195
 
196
-	/**
197
-	* The path to the modules directory. 
198
-	*
199
-	* It contains your modules used files (config, controllers, libraries, etc.) that is to say which contains your files of the modules, 
200
-	* in HMVC architecture (hierichical, controllers, models, views).
201
-	*/
202
-	define('MODULE_PATH', ROOT_PATH . 'modules' . DS);
196
+    /**
197
+     * The path to the modules directory. 
198
+     *
199
+     * It contains your modules used files (config, controllers, libraries, etc.) that is to say which contains your files of the modules, 
200
+     * in HMVC architecture (hierichical, controllers, models, views).
201
+     */
202
+    define('MODULE_PATH', ROOT_PATH . 'modules' . DS);
203 203
 
204
-	/**
205
-	* The path to the directory of sources external to your application.
206
-	*
207
-	* If you have already used "composer" you know what that means.
208
-	*/
209
-	define('VENDOR_PATH', ROOT_PATH . 'vendor' . DS);
204
+    /**
205
+     * The path to the directory of sources external to your application.
206
+     *
207
+     * If you have already used "composer" you know what that means.
208
+     */
209
+    define('VENDOR_PATH', ROOT_PATH . 'vendor' . DS);
210 210
 
211
-	/**
212
-	* The front controller of your application.
213
-	*
214
-	* "index.php" it is through this file that all the requests come, there is a possibility to hidden it in the url of 
215
-	* your application by using the rewrite module URL of your web server .
216
-	* For example, under apache web server, there is a configuration example file that is located at the root 
217
-	* of your framework folder : "htaccess.txt" rename it to ".htaccess".
218
-	*/
219
-	define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
211
+    /**
212
+     * The front controller of your application.
213
+     *
214
+     * "index.php" it is through this file that all the requests come, there is a possibility to hidden it in the url of 
215
+     * your application by using the rewrite module URL of your web server .
216
+     * For example, under apache web server, there is a configuration example file that is located at the root 
217
+     * of your framework folder : "htaccess.txt" rename it to ".htaccess".
218
+     */
219
+    define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
220 220
 	
221
-	/**
222
-	 * Check if user run the application under CLI
223
-	 */
224
-	define('IS_CLI', stripos('cli', php_sapi_name()) !== false);
221
+    /**
222
+     * Check if user run the application under CLI
223
+     */
224
+    define('IS_CLI', stripos('cli', php_sapi_name()) !== false);
225 225
 
226
-	/**
227
-	* The environment of your application (production, test, development). 
228
-	*
229
-	* if your application is still in development you use the value "development" 
230
-	* so you will have the display of the error messages, etc. 
231
-	* Once you finish the development of your application that is to put it online 
232
-	* you change this value to "production" or "testing", in this case there will be deactivation of error messages, 
233
-	* the loading of the system, will be fast.
234
-	*/
235
-	define('ENVIRONMENT', 'development');
226
+    /**
227
+     * The environment of your application (production, test, development). 
228
+     *
229
+     * if your application is still in development you use the value "development" 
230
+     * so you will have the display of the error messages, etc. 
231
+     * Once you finish the development of your application that is to put it online 
232
+     * you change this value to "production" or "testing", in this case there will be deactivation of error messages, 
233
+     * the loading of the system, will be fast.
234
+     */
235
+    define('ENVIRONMENT', 'development');
236 236
 
237
-	/* ---------------------------------------------------------------------------------- */
238
-	///////////////////////////////////////////////////////////////////////////////////////
239
-	/******************** DO NOT CHANGE THE LINES BELOW *********************************/
240
-	/////////////////////////////////////////////////////////////////////////////////////
237
+    /* ---------------------------------------------------------------------------------- */
238
+    ///////////////////////////////////////////////////////////////////////////////////////
239
+    /******************** DO NOT CHANGE THE LINES BELOW *********************************/
240
+    /////////////////////////////////////////////////////////////////////////////////////
241 241
 
242
-	switch (ENVIRONMENT) {
243
-		case 'development':
244
-			error_reporting(-1);
245
-			ini_set('display_errors', 1);
246
-		break;
247
-		case 'testing':
248
-		case 'production':
249
-			ini_set('display_errors', 0);
250
-			if (version_compare(PHP_VERSION, '5.3', '>=')) {
251
-				error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
252
-			}
253
-			else{
254
-				error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE);
255
-			}
256
-		break;
257
-		default:
258
-			header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
259
-			echo 'The application environment is not set correctly.';
260
-			exit(1);
261
-	}
242
+    switch (ENVIRONMENT) {
243
+        case 'development':
244
+            error_reporting(-1);
245
+            ini_set('display_errors', 1);
246
+        break;
247
+        case 'testing':
248
+        case 'production':
249
+            ini_set('display_errors', 0);
250
+            if (version_compare(PHP_VERSION, '5.3', '>=')) {
251
+                error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
252
+            }
253
+            else{
254
+                error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE);
255
+            }
256
+        break;
257
+        default:
258
+            header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
259
+            echo 'The application environment is not set correctly.';
260
+            exit(1);
261
+    }
262 262
 	
263
-	/**
264
-	* let's go.
265
-	* Everything is OK now we launch our application.
266
-	*/
267
-	require_once CORE_PATH . 'bootstrap.php';
268 263
\ No newline at end of file
264
+    /**
265
+     * let's go.
266
+     * Everything is OK now we launch our application.
267
+     */
268
+    require_once CORE_PATH . 'bootstrap.php';
269 269
\ No newline at end of file
Please login to merge, or discard this patch.
core/classes/cache/CacheInterface.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 	 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25 25
 	*/
26 26
 	
27
-	interface CacheInterface{
27
+	interface CacheInterface {
28 28
 
29 29
 		/**
30 30
 		 * This is used to get the cache data using the key
Please login to merge, or discard this patch.
Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -1,84 +1,84 @@
 block discarded – undo
1 1
 <?php
2
-	defined('ROOT_PATH') or exit('Access denied');
3
-	/**
4
-	 * TNH Framework
5
-	 *
6
-	 * A simple PHP framework using HMVC architecture
7
-	 *
8
-	 * This content is released under the GNU GPL License (GPL)
9
-	 *
10
-	 * Copyright (C) 2017 Tony NGUEREZA
11
-	 *
12
-	 * This program is free software; you can redistribute it and/or
13
-	 * modify it under the terms of the GNU General Public License
14
-	 * as published by the Free Software Foundation; either version 3
15
-	 * of the License, or (at your option) any later version.
16
-	 *
17
-	 * This program is distributed in the hope that it will be useful,
18
-	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
-	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
-	 * GNU General Public License for more details.
21
-	 *
22
-	 * You should have received a copy of the GNU General Public License
23
-	 * along with this program; if not, write to the Free Software
24
-	 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25
-	*/
2
+    defined('ROOT_PATH') or exit('Access denied');
3
+    /**
4
+     * TNH Framework
5
+     *
6
+     * A simple PHP framework using HMVC architecture
7
+     *
8
+     * This content is released under the GNU GPL License (GPL)
9
+     *
10
+     * Copyright (C) 2017 Tony NGUEREZA
11
+     *
12
+     * This program is free software; you can redistribute it and/or
13
+     * modify it under the terms of the GNU General Public License
14
+     * as published by the Free Software Foundation; either version 3
15
+     * of the License, or (at your option) any later version.
16
+     *
17
+     * This program is distributed in the hope that it will be useful,
18
+     * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
+     * GNU General Public License for more details.
21
+     *
22
+     * You should have received a copy of the GNU General Public License
23
+     * along with this program; if not, write to the Free Software
24
+     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25
+     */
26 26
 	
27
-	interface CacheInterface{
27
+    interface CacheInterface{
28 28
 
29
-		/**
30
-		 * This is used to get the cache data using the key
31
-		 * @param  string $key the key to identify the cache data
32
-		 * @return mixed      the cache data if exists else return false
33
-		 */
34
-		public function get($key);
29
+        /**
30
+         * This is used to get the cache data using the key
31
+         * @param  string $key the key to identify the cache data
32
+         * @return mixed      the cache data if exists else return false
33
+         */
34
+        public function get($key);
35 35
 
36 36
 
37
-		/**
38
-		 * Save data to the cache
39
-		 * @param string  $key  the key to identify this cache data
40
-		 * @param mixed  $data the cache data to be saved
41
-		 * @param integer $ttl  the cache life time
42
-		 * @return boolean true if success otherwise will return false
43
-		 */
44
-		public function set($key, $data, $ttl = 0);
37
+        /**
38
+         * Save data to the cache
39
+         * @param string  $key  the key to identify this cache data
40
+         * @param mixed  $data the cache data to be saved
41
+         * @param integer $ttl  the cache life time
42
+         * @return boolean true if success otherwise will return false
43
+         */
44
+        public function set($key, $data, $ttl = 0);
45 45
 
46 46
 
47
-		/**
48
-		 * Delete the cache data for given key
49
-		 * @param  string $key the key for cache to be deleted
50
-		 * @return boolean      true if the cache is deleted, false if can't delete 
51
-		 * the cache or the cache with the given key not exist
52
-		 */
53
-		public function delete($key);
47
+        /**
48
+         * Delete the cache data for given key
49
+         * @param  string $key the key for cache to be deleted
50
+         * @return boolean      true if the cache is deleted, false if can't delete 
51
+         * the cache or the cache with the given key not exist
52
+         */
53
+        public function delete($key);
54 54
 		
55 55
 		
56
-		/**
57
-		 * Get the cache information for given key
58
-		 * @param  string $key the key for cache to get the information for
59
-		 * @return boolean|array    the cache information. The associative array and must contains the following information:
60
-		 * 'mtime' => creation time of the cache (Unix timestamp),
61
-		 * 'expire' => expiration time of the cache (Unix timestamp),
62
-		 * 'ttl' => the time to live of the cache in second
63
-		 */
64
-		public function getInfo($key);
56
+        /**
57
+         * Get the cache information for given key
58
+         * @param  string $key the key for cache to get the information for
59
+         * @return boolean|array    the cache information. The associative array and must contains the following information:
60
+         * 'mtime' => creation time of the cache (Unix timestamp),
61
+         * 'expire' => expiration time of the cache (Unix timestamp),
62
+         * 'ttl' => the time to live of the cache in second
63
+         */
64
+        public function getInfo($key);
65 65
 
66 66
 
67
-		/**
68
-		 * Used to delete expired cache data
69
-		 */
70
-		public function deleteExpiredCache();
67
+        /**
68
+         * Used to delete expired cache data
69
+         */
70
+        public function deleteExpiredCache();
71 71
 
72
-		/**
73
-		 * Remove all cache data
74
-		 */
75
-		public function clean();
72
+        /**
73
+         * Remove all cache data
74
+         */
75
+        public function clean();
76 76
 		
77 77
 		
78
-		/**
79
-		 * Check whether the cache feature for the handle is supported
80
-		 *
81
-		 * @return bool
82
-		 */
83
-		public function isSupported();
84
-	}
78
+        /**
79
+         * Check whether the cache feature for the handle is supported
80
+         *
81
+         * @return bool
82
+         */
83
+        public function isSupported();
84
+    }
Please login to merge, or discard this patch.
core/libraries/StringHash.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 	 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25 25
 	*/
26 26
 
27
-	class StringHash{
27
+	class StringHash {
28 28
 		 
29 29
 		 //blowfish
30 30
 		private static $algo = '$2a';
Please login to merge, or discard this patch.
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -1,65 +1,65 @@
 block discarded – undo
1 1
 <?php 
2
-	defined('ROOT_PATH') || exit('Access denied');
3
-	/**
4
-	 * TNH Framework
5
-	 *
6
-	 * A simple PHP framework using HMVC architecture
7
-	 *
8
-	 * This content is released under the GNU GPL License (GPL)
9
-	 *
10
-	 * Copyright (C) 2017 Tony NGUEREZA
11
-	 *
12
-	 * This program is free software; you can redistribute it and/or
13
-	 * modify it under the terms of the GNU General Public License
14
-	 * as published by the Free Software Foundation; either version 3
15
-	 * of the License, or (at your option) any later version.
16
-	 *
17
-	 * This program is distributed in the hope that it will be useful,
18
-	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
-	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
-	 * GNU General Public License for more details.
21
-	 *
22
-	 * You should have received a copy of the GNU General Public License
23
-	 * along with this program; if not, write to the Free Software
24
-	 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25
-	*/
2
+    defined('ROOT_PATH') || exit('Access denied');
3
+    /**
4
+     * TNH Framework
5
+     *
6
+     * A simple PHP framework using HMVC architecture
7
+     *
8
+     * This content is released under the GNU GPL License (GPL)
9
+     *
10
+     * Copyright (C) 2017 Tony NGUEREZA
11
+     *
12
+     * This program is free software; you can redistribute it and/or
13
+     * modify it under the terms of the GNU General Public License
14
+     * as published by the Free Software Foundation; either version 3
15
+     * of the License, or (at your option) any later version.
16
+     *
17
+     * This program is distributed in the hope that it will be useful,
18
+     * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
+     * GNU General Public License for more details.
21
+     *
22
+     * You should have received a copy of the GNU General Public License
23
+     * along with this program; if not, write to the Free Software
24
+     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25
+     */
26 26
 
27
-	class StringHash{
27
+    class StringHash{
28 28
 		 
29
-		 //blowfish
30
-		private static $algo = '$2a';
29
+            //blowfish
30
+        private static $algo = '$2a';
31 31
 		
32
-		//cost parameter
33
-		private static $cost = '$10';
32
+        //cost parameter
33
+        private static $cost = '$10';
34 34
 
35
-		/**
36
-		 * Get the unique salt for the string hash
37
-		 * @return string the unique generated salt
38
-		 */
39
-		private static function uniqueSalt() {
40
-			return substr(sha1(mt_rand()), 0, 22);
41
-		}
35
+        /**
36
+         * Get the unique salt for the string hash
37
+         * @return string the unique generated salt
38
+         */
39
+        private static function uniqueSalt() {
40
+            return substr(sha1(mt_rand()), 0, 22);
41
+        }
42 42
 
43
-		/**
44
-		 * Hash the given string
45
-		 * @param  string $value the plain string text to be hashed
46
-		 * @return string           the hashed string
47
-		 */
48
-		public static function hash($value) {
49
-			return crypt($value, self::$algo .
50
-					self::$cost .
51
-					'$' . self::uniqueSalt());
52
-		}
43
+        /**
44
+         * Hash the given string
45
+         * @param  string $value the plain string text to be hashed
46
+         * @return string           the hashed string
47
+         */
48
+        public static function hash($value) {
49
+            return crypt($value, self::$algo .
50
+                    self::$cost .
51
+                    '$' . self::uniqueSalt());
52
+        }
53 53
 
54
-		/**
55
-		 * Check if the hash and plain string is valid
56
-		 * @param  string $hash     the hashed string
57
-		 * @param  string $plain the plain text
58
-		 * @return boolean  true if is valid or false if not
59
-		 */
60
-		public static function check($hash, $plain) {
61
-			$full_salt = substr($hash, 0, 29);
62
-			$new_hash = crypt($plain, $full_salt);
63
-			return ($hash === $new_hash);
64
-		}	
65
-	}
66 54
\ No newline at end of file
55
+        /**
56
+         * Check if the hash and plain string is valid
57
+         * @param  string $hash     the hashed string
58
+         * @param  string $plain the plain text
59
+         * @return boolean  true if is valid or false if not
60
+         */
61
+        public static function check($hash, $plain) {
62
+            $full_salt = substr($hash, 0, 29);
63
+            $new_hash = crypt($plain, $full_salt);
64
+            return ($hash === $new_hash);
65
+        }	
66
+    }
67 67
\ No newline at end of file
Please login to merge, or discard this patch.
core/functions/function_lang.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25 25
 	*/
26 26
 
27
-	if(! function_exists('__')){
27
+	if (!function_exists('__')) {
28 28
 		/**
29 29
 		 * function for the shortcut to Lang::get()
30 30
 		 * @param  string $key the language key to retrieve
@@ -32,20 +32,20 @@  discard block
 block discarded – undo
32 32
 		 * for the given key
33 33
 		 * @return string  the language value
34 34
 		 */
35
-		function __($key, $default = 'LANGUAGE_ERROR'){
35
+		function __($key, $default = 'LANGUAGE_ERROR') {
36 36
 			return get_instance()->lang->get($key, $default);
37 37
 		}
38 38
 
39 39
 	}
40 40
 
41 41
 
42
-	if(! function_exists('get_languages')){
42
+	if (!function_exists('get_languages')) {
43 43
 		/**
44 44
 		 * function for the shortcut to Lang::getSupported()
45 45
 		 * 
46 46
 		 * @return array all the supported languages
47 47
 		 */
48
-		function get_languages(){
48
+		function get_languages() {
49 49
 			return get_instance()->lang->getSupported();
50 50
 		}
51 51
 
Please login to merge, or discard this patch.
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -1,52 +1,52 @@
 block discarded – undo
1 1
 <?php
2
-	defined('ROOT_PATH') || exit('Access denied');
3
-	/**
4
-	 * TNH Framework
5
-	 *
6
-	 * A simple PHP framework using HMVC architecture
7
-	 *
8
-	 * This content is released under the GNU GPL License (GPL)
9
-	 *
10
-	 * Copyright (C) 2017 Tony NGUEREZA
11
-	 *
12
-	 * This program is free software; you can redistribute it and/or
13
-	 * modify it under the terms of the GNU General Public License
14
-	 * as published by the Free Software Foundation; either version 3
15
-	 * of the License, or (at your option) any later version.
16
-	 *
17
-	 * This program is distributed in the hope that it will be useful,
18
-	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
-	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
-	 * GNU General Public License for more details.
21
-	 *
22
-	 * You should have received a copy of the GNU General Public License
23
-	 * along with this program; if not, write to the Free Software
24
-	 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25
-	*/
2
+    defined('ROOT_PATH') || exit('Access denied');
3
+    /**
4
+     * TNH Framework
5
+     *
6
+     * A simple PHP framework using HMVC architecture
7
+     *
8
+     * This content is released under the GNU GPL License (GPL)
9
+     *
10
+     * Copyright (C) 2017 Tony NGUEREZA
11
+     *
12
+     * This program is free software; you can redistribute it and/or
13
+     * modify it under the terms of the GNU General Public License
14
+     * as published by the Free Software Foundation; either version 3
15
+     * of the License, or (at your option) any later version.
16
+     *
17
+     * This program is distributed in the hope that it will be useful,
18
+     * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
+     * GNU General Public License for more details.
21
+     *
22
+     * You should have received a copy of the GNU General Public License
23
+     * along with this program; if not, write to the Free Software
24
+     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25
+     */
26 26
 
27
-	if(! function_exists('__')){
28
-		/**
29
-		 * function for the shortcut to Lang::get()
30
-		 * @param  string $key the language key to retrieve
31
-		 * @param mixed $default the default value to return if can not find the value
32
-		 * for the given key
33
-		 * @return string  the language value
34
-		 */
35
-		function __($key, $default = 'LANGUAGE_ERROR'){
36
-			return get_instance()->lang->get($key, $default);
37
-		}
27
+    if(! function_exists('__')){
28
+        /**
29
+         * function for the shortcut to Lang::get()
30
+         * @param  string $key the language key to retrieve
31
+         * @param mixed $default the default value to return if can not find the value
32
+         * for the given key
33
+         * @return string  the language value
34
+         */
35
+        function __($key, $default = 'LANGUAGE_ERROR'){
36
+            return get_instance()->lang->get($key, $default);
37
+        }
38 38
 
39
-	}
39
+    }
40 40
 
41 41
 
42
-	if(! function_exists('get_languages')){
43
-		/**
44
-		 * function for the shortcut to Lang::getSupported()
45
-		 * 
46
-		 * @return array all the supported languages
47
-		 */
48
-		function get_languages(){
49
-			return get_instance()->lang->getSupported();
50
-		}
42
+    if(! function_exists('get_languages')){
43
+        /**
44
+         * function for the shortcut to Lang::getSupported()
45
+         * 
46
+         * @return array all the supported languages
47
+         */
48
+        function get_languages(){
49
+            return get_instance()->lang->getSupported();
50
+        }
51 51
 
52
-	}
53 52
\ No newline at end of file
53
+    }
54 54
\ No newline at end of file
Please login to merge, or discard this patch.
core/views/errors.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
     <meta name="viewport" content="width=device-width, initial-scale=1">
7 7
     <meta name="description" content="">
8 8
     <meta name="author" content="Tony NGUEREZA">
9
-    <title><?php echo $title;?></title>
9
+    <title><?php echo $title; ?></title>
10 10
 	<style type = 'text/css'>
11 11
 	/* reset */
12 12
 		*{
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
   <body>
65 65
 	<div class="container">
66 66
 		<div class = "title">
67
-			<h2><?php echo $title;?></h2>
67
+			<h2><?php echo $title; ?></h2>
68 68
 		</div>
69 69
 		<div class = "body">
70
-			<p><?php echo $error;?></p>
70
+			<p><?php echo $error; ?></p>
71 71
 		</div>
72 72
 	</div> <!-- ./container-->
73 73
    </body>
Please login to merge, or discard this patch.
core/lang/en/lang_form_validation.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@  discard block
 block discarded – undo
3 3
  	/**
4 4
  	 * Form validation language message (English) 
5 5
  	 */
6
- 	$lang['fv_required']     		= 'Field %1 is required.';
6
+ 	$lang['fv_required'] = 'Field %1 is required.';
7 7
     $lang['fv_min_length']   		= 'Field %1 must contain at least %2 characters.';
8 8
     $lang['fv_max_length']   		= 'Field %1 must contain at most %2 characters.';
9 9
     $lang['fv_exact_length'] 		= 'Field %1 must contain exactly %2 characters.';
10
-    $lang['fv_less_than'] 		    = 'Field %1 must less than %2.';
10
+    $lang['fv_less_than'] = 'Field %1 must less than %2.';
11 11
     $lang['fv_greater_than'] 		= 'Field %1 must greater than %2.';
12 12
     $lang['fv_matches']      		= 'Field %1 must be identical to field %2.';
13 13
     $lang['fv_valid_email']  		= 'Field %1 must contain a valid E-mail address.';
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     $lang['fv_depends']      		= 'Field %1 depends on field %2 which is not valid.';
17 17
 	$lang['fv_is_unique']	   		= 'The value of field %1 already exists.';
18 18
 	$lang['fv_is_unique_update']	= 'The value of field %1 already exists for another record.';
19
-    $lang['fv_exists']	   			= 'The value of the field %1 does not exist.';
19
+    $lang['fv_exists'] = 'The value of the field %1 does not exist.';
20 20
     $lang['fv_regex']	   			= 'The value of the field %1 does not use the correct format.';
21 21
     $lang['fv_in_list']	   			= 'The value of field %1 must be one of the list (%2).';
22 22
     $lang['fv_numeric']	   			= 'The value of field %1 must be a number.';
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php 
2 2
     defined('ROOT_PATH') || exit('Access denied');
3
- 	/**
4
- 	 * Form validation language message (English) 
5
- 	 */
6
- 	$lang['fv_required']     		= 'Field %1 is required.';
3
+        /**
4
+         * Form validation language message (English) 
5
+         */
6
+        $lang['fv_required']     		= 'Field %1 is required.';
7 7
     $lang['fv_min_length']   		= 'Field %1 must contain at least %2 characters.';
8 8
     $lang['fv_max_length']   		= 'Field %1 must contain at most %2 characters.';
9 9
     $lang['fv_exact_length'] 		= 'Field %1 must contain exactly %2 characters.';
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
     $lang['fv_not_equal_post_key']  = 'Field %1 must not be the same as field %2.';
15 15
     $lang['fv_not_equal_string']    = 'Field %1 must not contain the value %2.';
16 16
     $lang['fv_depends']      		= 'Field %1 depends on field %2 which is not valid.';
17
-	$lang['fv_is_unique']	   		= 'The value of field %1 already exists.';
18
-	$lang['fv_is_unique_update']	= 'The value of field %1 already exists for another record.';
17
+    $lang['fv_is_unique']	   		= 'The value of field %1 already exists.';
18
+    $lang['fv_is_unique_update']	= 'The value of field %1 already exists for another record.';
19 19
     $lang['fv_exists']	   			= 'The value of the field %1 does not exist.';
20 20
     $lang['fv_regex']	   			= 'The value of the field %1 does not use the correct format.';
21 21
     $lang['fv_in_list']	   			= 'The value of field %1 must be one of the list (%2).';
Please login to merge, or discard this patch.
core/lang/en/lang_file_upload.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@
 block discarded – undo
6 6
  	$lang['fu_upload_err_ini_size']     = 'The uploaded file exceeds the upload_max_filesize directive in php.ini.';
7 7
     $lang['fu_upload_err_form_size']   	= 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.';
8 8
     $lang['fu_upload_err_partial']   	= 'The uploaded file was only partially uploaded.';
9
-    $lang['fu_upload_err_no_file'] 		= 'No file was choosed. Please select one.';
9
+    $lang['fu_upload_err_no_file'] = 'No file was choosed. Please select one.';
10 10
     $lang['fu_upload_err_no_tmp_dir']   = 'Missing a temporary folder.';
11
-    $lang['fu_upload_err_cant_write'] 	= 'Failed to write file to disk.';
11
+    $lang['fu_upload_err_cant_write'] = 'Failed to write file to disk.';
12 12
     $lang['fu_upload_err_extension']    = 'A PHP extension stopped the file upload.';
13
-    $lang['fu_accept_file_types']  		= 'Filetype not allowed';
13
+    $lang['fu_accept_file_types'] = 'Filetype not allowed';
14 14
     $lang['fu_file_uploads_disabled']   = 'File uploading option is disabled in php.ini';
15 15
     $lang['fu_max_file_size']           = 'The uploaded file size is too big max size is %s';
16 16
     $lang['fu_overwritten_not_allowed'] = 'You don\'t allow overwriting existing file';
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php 
2 2
     defined('ROOT_PATH') || exit('Access denied');
3
- 	/**
4
- 	 * File upload language messages (English) 
5
- 	 */
6
- 	$lang['fu_upload_err_ini_size']     = 'The uploaded file exceeds the upload_max_filesize directive in php.ini.';
3
+        /**
4
+         * File upload language messages (English) 
5
+         */
6
+        $lang['fu_upload_err_ini_size']     = 'The uploaded file exceeds the upload_max_filesize directive in php.ini.';
7 7
     $lang['fu_upload_err_form_size']   	= 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.';
8 8
     $lang['fu_upload_err_partial']   	= 'The uploaded file was only partially uploaded.';
9 9
     $lang['fu_upload_err_no_file'] 		= 'No file was choosed. Please select one.';
Please login to merge, or discard this patch.
core/classes/model/DBSessionHandlerModel.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 		 */
46 46
 		protected $sessionTableColumns = array();
47 47
 
48
-		public function __construct(Database $db = null){
48
+		public function __construct(Database $db = null) {
49 49
 			parent::__construct($db);
50 50
 		}
51 51
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 		 * Return the session database table columns
54 54
 		 * @return array 
55 55
 		 */
56
-		public function getSessionTableColumns(){
56
+		public function getSessionTableColumns() {
57 57
 			return $this->sessionTableColumns;
58 58
 		}
59 59
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		 * Set the session database table columns
62 62
 		 * @param array $columns the columns definition
63 63
 		 */
64
-		public function setSessionTableColumns(array $columns){
64
+		public function setSessionTableColumns(array $columns) {
65 65
 			$this->sessionTableColumns = $columns;
66 66
 			return $this;
67 67
 		}
Please login to merge, or discard this patch.
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -1,39 +1,39 @@  discard block
 block discarded – undo
1 1
 <?php
2
-	defined('ROOT_PATH') || exit('Access denied');
3
-	/**
4
-	 * TNH Framework
5
-	 *
6
-	 * A simple PHP framework using HMVC architecture
7
-	 *
8
-	 * This content is released under the GNU GPL License (GPL)
9
-	 *
10
-	 * Copyright (C) 2017 Tony NGUEREZA
11
-	 *
12
-	 * This program is free software; you can redistribute it and/or
13
-	 * modify it under the terms of the GNU General Public License
14
-	 * as published by the Free Software Foundation; either version 3
15
-	 * of the License, or (at your option) any later version.
16
-	 *
17
-	 * This program is distributed in the hope that it will be useful,
18
-	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
-	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
-	 * GNU General Public License for more details.
21
-	 *
22
-	 * You should have received a copy of the GNU General Public License
23
-	 * along with this program; if not, write to the Free Software
24
-	 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25
-	*/
2
+    defined('ROOT_PATH') || exit('Access denied');
3
+    /**
4
+     * TNH Framework
5
+     *
6
+     * A simple PHP framework using HMVC architecture
7
+     *
8
+     * This content is released under the GNU GPL License (GPL)
9
+     *
10
+     * Copyright (C) 2017 Tony NGUEREZA
11
+     *
12
+     * This program is free software; you can redistribute it and/or
13
+     * modify it under the terms of the GNU General Public License
14
+     * as published by the Free Software Foundation; either version 3
15
+     * of the License, or (at your option) any later version.
16
+     *
17
+     * This program is distributed in the hope that it will be useful,
18
+     * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
+     * GNU General Public License for more details.
21
+     *
22
+     * You should have received a copy of the GNU General Public License
23
+     * along with this program; if not, write to the Free Software
24
+     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25
+     */
26 26
 	
27
-	/**
28
-	 * DB session handler class
29
-	 */
30
- 	abstract class DBSessionHandlerModel extends Model {
27
+    /**
28
+     * DB session handler class
29
+     */
30
+        abstract class DBSessionHandlerModel extends Model {
31 31
 		
32
-		/**
33
-		 * The session table columns to use
34
-		 * @var array
35
-		 * @example
36
-		 * 	array(
32
+        /**
33
+         * The session table columns to use
34
+         * @var array
35
+         * @example
36
+         * 	array(
37 37
 				'sid' => '', //VARCHAR(255) Note: this a primary key
38 38
 				'sdata' => '', //TEXT
39 39
 				'stime' => '', //unix timestamp (INT|BIGINT)
@@ -42,41 +42,41 @@  discard block
 block discarded – undo
42 42
 				'sbrowser' => '', //VARCHAR(255) 
43 43
 				'skey' => '' //VARCHAR(255) 
44 44
 			);
45
-		 */
46
-		protected $sessionTableColumns = array();
45
+         */
46
+        protected $sessionTableColumns = array();
47 47
 
48
-		public function __construct(Database $db = null){
49
-			parent::__construct($db);
50
-		}
48
+        public function __construct(Database $db = null){
49
+            parent::__construct($db);
50
+        }
51 51
 
52
-		/**
53
-		 * Return the session database table columns
54
-		 * @return array 
55
-		 */
56
-		public function getSessionTableColumns(){
57
-			return $this->sessionTableColumns;
58
-		}
52
+        /**
53
+         * Return the session database table columns
54
+         * @return array 
55
+         */
56
+        public function getSessionTableColumns(){
57
+            return $this->sessionTableColumns;
58
+        }
59 59
 
60
-		/**
61
-		 * Set the session database table columns
62
-		 * @param array $columns the columns definition
63
-		 */
64
-		public function setSessionTableColumns(array $columns){
65
-			$this->sessionTableColumns = $columns;
66
-			return $this;
67
-		}
60
+        /**
61
+         * Set the session database table columns
62
+         * @param array $columns the columns definition
63
+         */
64
+        public function setSessionTableColumns(array $columns){
65
+            $this->sessionTableColumns = $columns;
66
+            return $this;
67
+        }
68 68
 
69
-		/**
70
-		 * Delete the expire session
71
-		 * @param  int $time the unix timestamp
72
-		 * @return int       affected rows
73
-		 */
74
-		abstract public function deleteByTime($time);
69
+        /**
70
+         * Delete the expire session
71
+         * @param  int $time the unix timestamp
72
+         * @return int       affected rows
73
+         */
74
+        abstract public function deleteByTime($time);
75 75
 
76 76
 		
77
-		/**
78
-		 * How to get the value of the table column key. Generally is the session key
79
-		 * @return mixed the key value like used to identify the data
80
-		 */
81
-		abstract public function getKeyValue();
82
-	}
77
+        /**
78
+         * How to get the value of the table column key. Generally is the session key
79
+         * @return mixed the key value like used to identify the data
80
+         */
81
+        abstract public function getKeyValue();
82
+    }
Please login to merge, or discard this patch.