Passed
Push — 1.0.0-dev ( 8edc19...2b6704 )
by nguereza
03:32
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 1 patch
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.
core/classes/cache/CacheInterface.php 1 patch
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.
core/libraries/PDF.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	/**
28 28
 	 * PDF library to generate PDF document using the library DOMPDF
29 29
 	 */
30
-	class PDF{
30
+	class PDF {
31 31
 		
32 32
 		/**
33 33
 		 * The dompdf instance
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
 		/**
45 45
 		 * Create PDF library instance
46 46
 		 */
47
-		public function __construct(){
48
-	        $this->logger =& class_loader('Log', 'classes');
47
+		public function __construct() {
48
+	        $this->logger = & class_loader('Log', 'classes');
49 49
 	        $this->logger->setLogger('Library::PDF');
50 50
 
51
-			require_once VENDOR_PATH.'dompdf/dompdf_config.inc.php';
51
+			require_once VENDOR_PATH . 'dompdf/dompdf_config.inc.php';
52 52
 			$this->dompdf = new Dompdf();
53 53
 		}
54 54
 
@@ -62,15 +62,15 @@  discard block
 block discarded – undo
62 62
 		 * @return string|void               if $stream is true send PDF document to browser for download, else return the generated PDF
63 63
 		 * content like to join in Email attachment of for other purpose use.
64 64
 		 */
65
-		public function generate($html, $filename = 'output.pdf', $stream = true, $paper = 'A4', $orientation = 'portrait'){
66
-			$this->logger->info('Generating of PDF document: filename [' .$filename. '], stream [' .($stream ? 'TRUE':'FALSE'). '], paper [' .$paper. '], orientation [' .$orientation. ']');
65
+		public function generate($html, $filename = 'output.pdf', $stream = true, $paper = 'A4', $orientation = 'portrait') {
66
+			$this->logger->info('Generating of PDF document: filename [' . $filename . '], stream [' . ($stream ? 'TRUE' : 'FALSE') . '], paper [' . $paper . '], orientation [' . $orientation . ']');
67 67
 			$this->dompdf->load_html($html);
68 68
 			$this->dompdf->set_paper($paper, $orientation);
69 69
 			$this->dompdf->render();
70
-			if($stream){
70
+			if ($stream) {
71 71
 				$this->dompdf->stream($filename);
72 72
 			}
73
-			else{
73
+			else {
74 74
 				return $this->dompdf->output();
75 75
 			}
76 76
 		}
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 		*
81 81
 		* @return object the dompdf instance
82 82
 		*/
83
-		public function getDompdf(){
83
+		public function getDompdf() {
84 84
 			return $this->dompdf;
85 85
 		}
86 86
 		
Please login to merge, or discard this patch.
core/libraries/StringHash.php 1 patch
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.
core/functions/function_lang.php 1 patch
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.
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 1 patch
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.
core/lang/en/lang_file_upload.php 1 patch
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.