Passed
Branch 1.0.0-dev (c78053)
by nguereza
04:10 queued 15s
created
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/functions/function_string.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	 *  @filesource
40 40
 	 */
41 41
 
42
-	if(! function_exists('get_random_string')){
42
+	if (!function_exists('get_random_string')) {
43 43
 		/**
44 44
 		 * Generate a random string
45 45
 		 * @param  string $type the type of generation. It can take the values: "alpha" for alphabetic characters,
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
 		 * @param  boolean $lower if we return the generated string in lowercase (true). By default it's false.
50 50
 		 * @return string the generated string.
51 51
 		 */
52
-		function get_random_string($type = 'alnum', $length = 10, $lower = false){
52
+		function get_random_string($type = 'alnum', $length = 10, $lower = false) {
53 53
 			$str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
54
-			switch($type){
54
+			switch ($type) {
55 55
 				case 'alpha':
56 56
 					$str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
57 57
 				break;
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
 				break;
64 64
 			}
65 65
 			$random = null;
66
-			for($i = 0; $i < $length; $i++){
66
+			for ($i = 0; $i < $length; $i++) {
67 67
 				$random .= $str[mt_rand() % strlen($str)];
68 68
 			}
69
-			if($lower){
69
+			if ($lower) {
70 70
 				$random = strtolower($random);
71 71
 			}
72 72
 			return $random;
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.
tests/include/autoloader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	//Autoload function
3
-	function test_autoload($class){
3
+	function test_autoload($class) {
4 4
 		$classesMap = array(
5 5
 			//Caches
6 6
 			'ApcCache' => CORE_CLASSES_CACHE_PATH . 'ApcCache.php',
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
 			'StringHash' => CORE_LIBRARY_PATH . 'StringHash.php',
40 40
 			'Upload' => CORE_LIBRARY_PATH . 'Upload.php',
41 41
 		);
42
-		if(isset($classesMap[$class])){
43
-			if(file_exists($classesMap[$class])){
42
+		if (isset($classesMap[$class])) {
43
+			if (file_exists($classesMap[$class])) {
44 44
 				include_once $classesMap[$class];
45 45
 			}
46
-			else{
46
+			else {
47 47
 				echo 'File for class ' . $class . ' not found';
48 48
 			}
49 49
 		}
Please login to merge, or discard this patch.
tests/include/testsUtil.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 	/**
4 4
 	* Function to test private & protected method
5 5
 	*/
6
-	function runPrivateOrProtectedMethod($object, $method, array $args = array()){
6
+	function runPrivateOrProtectedMethod($object, $method, array $args = array()) {
7 7
 		$r = new ReflectionClass(get_class($object));
8 8
 		$m = $r->getMethod($method);
9 9
 		$m->setAccessible(true);
Please login to merge, or discard this patch.
core/functions/function_user_agent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 */
42 42
 	
43 43
 	 
44
-	if(! function_exists('get_ip')){
44
+	if (!function_exists('get_ip')) {
45 45
 		/**
46 46
 		 *  Retrieves the user's IP address
47 47
 		 *  
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 		 *  
51 51
 		 *  @return string the IP address.
52 52
 		 */
53
-		function get_ip(){
53
+		function get_ip() {
54 54
 			$ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';
55 55
 
56 56
 			if (isset($_SERVER["HTTP_CLIENT_IP"])) {
Please login to merge, or discard this patch.
core/classes/model/DBSessionHandlerModel.php 1 patch
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.