Completed
Branch 0.2.3 (4e241d)
by Anton
15:52 queued 09:37
created
www/engine/Framework/Includes/Headers/Mime.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 
3 3
 # Mime types
4 4
 
5
-define('MIME_TYPE_HTML',        'html');
6
-define('MIME_TYPE_XML',         'xml');
7
-define('MIME_TYPE_JSON',        'json');
5
+define('MIME_TYPE_HTML', 'html');
6
+define('MIME_TYPE_XML', 'xml');
7
+define('MIME_TYPE_JSON', 'json');
8 8
 
9
-define('MIME_TYPE_JPEG',        'jpeg');
10
-define('MIME_TYPE_PNG',         'png');
11
-define('MIME_TYPE_GIF',         'gif');
9
+define('MIME_TYPE_JPEG', 'jpeg');
10
+define('MIME_TYPE_PNG', 'png');
11
+define('MIME_TYPE_GIF', 'gif');
Please login to merge, or discard this patch.
www/engine/Framework/Includes/Regex.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 define('REGEX_TEMPLATE_ITEM_NAME',                  '/^(?![0-9_])(?!.*_$)(?!.*_{2,})[a-zA-Z0-9_]+$/');
15 15
 
16 16
 define('REGEX_TEMPLATE_STRUCTURE',                   '/(?s){[ ]*(!)?[ ]*(block|for|widget)[ ]*:[ ]*([a-zA-Z0-9_]+)[ ]*' .
17
-                                                     '(?:\/[ ]*}|}(.*?){[ ]*\/[ ]*\2[ ]*:[ ]*\3[ ]*})/');
17
+													 '(?:\/[ ]*}|}(.*?){[ ]*\/[ ]*\2[ ]*:[ ]*\3[ ]*})/');
18 18
 
19 19
 define('REGEX_TEMPLATE_VARIABLE',                   '/\$([a-zA-Z0-9_]+)\$/');
20 20
 define('REGEX_TEMPLATE_PHRASE',                     '/\%([a-zA-Z0-9_]+)\%/');
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,19 +2,19 @@
 block discarded – undo
2 2
 
3 3
 # Form expressions
4 4
 
5
-define('REGEX_FORM_NAME',                           '/^[a-zA-Z][a-zA-Z0-9]*$/');
6
-define('REGEX_FORM_FIELD_KEY',                      '/^(?![0-9_])(?!.*_$)(?!.*_{2,})[a-zA-Z0-9_]+$/');
5
+define('REGEX_FORM_NAME', '/^[a-zA-Z][a-zA-Z0-9]*$/');
6
+define('REGEX_FORM_FIELD_KEY', '/^(?![0-9_])(?!.*_$)(?!.*_{2,})[a-zA-Z0-9_]+$/');
7 7
 
8 8
 # Language expressions
9 9
 
10
-define('REGEX_LANGUAGE_PHRASE_NAME',                '/^(?![0-9_])(?!.*_$)(?!.*_{2,})[a-zA-Z0-9_]+$/');
10
+define('REGEX_LANGUAGE_PHRASE_NAME', '/^(?![0-9_])(?!.*_$)(?!.*_{2,})[a-zA-Z0-9_]+$/');
11 11
 
12 12
 # Template expressions
13 13
 
14
-define('REGEX_TEMPLATE_ITEM_NAME',                  '/^(?![0-9_])(?!.*_$)(?!.*_{2,})[a-zA-Z0-9_]+$/');
14
+define('REGEX_TEMPLATE_ITEM_NAME', '/^(?![0-9_])(?!.*_$)(?!.*_{2,})[a-zA-Z0-9_]+$/');
15 15
 
16
-define('REGEX_TEMPLATE_STRUCTURE',                   '/(?s){[ ]*(!)?[ ]*(block|for|widget)[ ]*:[ ]*([a-zA-Z0-9_]+)[ ]*' .
16
+define('REGEX_TEMPLATE_STRUCTURE', '/(?s){[ ]*(!)?[ ]*(block|for|widget)[ ]*:[ ]*([a-zA-Z0-9_]+)[ ]*' .
17 17
                                                      '(?:\/[ ]*}|}(.*?){[ ]*\/[ ]*\2[ ]*:[ ]*\3[ ]*})/');
18 18
 
19
-define('REGEX_TEMPLATE_VARIABLE',                   '/\$([a-zA-Z0-9_]+)\$/');
20
-define('REGEX_TEMPLATE_PHRASE',                     '/\%([a-zA-Z0-9_]+)\%/');
19
+define('REGEX_TEMPLATE_VARIABLE', '/\$([a-zA-Z0-9_]+)\$/');
20
+define('REGEX_TEMPLATE_PHRASE', '/\%([a-zA-Z0-9_]+)\%/');
Please login to merge, or discard this patch.
www/engine/Framework/Includes/Constants.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -2,28 +2,28 @@
 block discarded – undo
2 2
 
3 3
 # Cache limiters
4 4
 
5
-define('CACHE_LIMITER_PRIVATE',                     'private');
6
-define('CACHE_LIMITER_PUBLIC',                      'public');
5
+define('CACHE_LIMITER_PRIVATE', 'private');
6
+define('CACHE_LIMITER_PUBLIC', 'public');
7 7
 
8 8
 # Date formats
9 9
 
10
-define('DATE_FORMAT_STANDART',                      'd.m.Y');
11
-define('DATE_FORMAT_MYSQL',                         'Y-m-d');
12
-define('DATE_FORMAT_DATETIME',                      'd.m.Y, H:i');
13
-define('DATE_FORMAT_W3C',                           'Y-m-d\TH:i:sP');
10
+define('DATE_FORMAT_STANDART', 'd.m.Y');
11
+define('DATE_FORMAT_MYSQL', 'Y-m-d');
12
+define('DATE_FORMAT_DATETIME', 'd.m.Y, H:i');
13
+define('DATE_FORMAT_W3C', 'Y-m-d\TH:i:sP');
14 14
 
15 15
 # Form fields
16 16
 
17
-define('FORM_FIELD_HIDDEN',                         'hidden');
18
-define('FORM_FIELD_PASSWORD',                       'password');
19
-define('FORM_FIELD_CAPTCHA',                        'captcha');
20
-define('FORM_FIELD_TEXT',                           'text');
21
-define('FORM_FIELD_TEXTAREA',                       'textarea');
17
+define('FORM_FIELD_HIDDEN', 'hidden');
18
+define('FORM_FIELD_PASSWORD', 'password');
19
+define('FORM_FIELD_CAPTCHA', 'captcha');
20
+define('FORM_FIELD_TEXT', 'text');
21
+define('FORM_FIELD_TEXTAREA', 'textarea');
22 22
 
23 23
 # String pools
24 24
 
25
-define('STR_POOL_DEFAULT',                          'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789');
26
-define('STR_POOL_LATIN',                            'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
27
-define('STR_POOL_LATIN_LOWER',                      'abcdefghijklmnopqrstuvwxyz');
28
-define('STR_POOL_LATIN_UPPER',                      'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
29
-define('STR_POOL_NUMERIC',                          '0123456789');
25
+define('STR_POOL_DEFAULT', 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789');
26
+define('STR_POOL_LATIN', 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
27
+define('STR_POOL_LATIN_LOWER', 'abcdefghijklmnopqrstuvwxyz');
28
+define('STR_POOL_LATIN_UPPER', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
29
+define('STR_POOL_NUMERIC', '0123456789');
Please login to merge, or discard this patch.
www/engine/Framework/Exception.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,28 +32,28 @@
 block discarded – undo
32 32
 
33 33
 	# Class load exception
34 34
 
35
-	class ClassLoad extends Exception  {
35
+	class ClassLoad extends Exception {
36 36
 
37 37
 		protected $message = 'Class \'$value$\' not found';
38 38
 	}
39 39
 
40 40
 	# Database connect exception
41 41
 
42
-	class DBConnect extends Exception  {
42
+	class DBConnect extends Exception {
43 43
 
44 44
 		protected $message = 'Unable to connect to database';
45 45
 	}
46 46
 
47 47
 	# Database select exception
48 48
 
49
-	class DBSelect extends Exception  {
49
+	class DBSelect extends Exception {
50 50
 
51 51
 		protected $message = 'Unable to select database';
52 52
 	}
53 53
 
54 54
 	# Database charset exception
55 55
 
56
-	class DBCharset extends Exception  {
56
+	class DBCharset extends Exception {
57 57
 
58 58
 		protected $message = 'Unable to set database charset';
59 59
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
26 26
 
27 27
 		public function __construct(string $message = '') {
28 28
 
29
-			if ('' !== $message) $this->message = $message;
29
+			if ('' !== $message) {
30
+				$this->message = $message;
31
+			}
30 32
 		}
31 33
 	}
32 34
 
Please login to merge, or discard this patch.
www/engine/Framework/Engine.php 1 patch
Braces   +23 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,17 +8,29 @@  discard block
 block discarded – undo
8 8
 
9 9
 		public static function ip() {
10 10
 
11
-			if (!empty(getenv('HTTP_CLIENT_IP')))           return getenv('HTTP_CLIENT_IP');
11
+			if (!empty(getenv('HTTP_CLIENT_IP'))) {
12
+				return getenv('HTTP_CLIENT_IP');
13
+			}
12 14
 
13
-			if (!empty(getenv('HTTP_X_FORWARDED_FOR')))     return getenv('HTTP_X_FORWARDED_FOR');
15
+			if (!empty(getenv('HTTP_X_FORWARDED_FOR'))) {
16
+				return getenv('HTTP_X_FORWARDED_FOR');
17
+			}
14 18
 
15
-			if (!empty(getenv('HTTP_X_FORWARDED')))         return getenv('HTTP_X_FORWARDED');
19
+			if (!empty(getenv('HTTP_X_FORWARDED'))) {
20
+				return getenv('HTTP_X_FORWARDED');
21
+			}
16 22
 
17
-			if (!empty(getenv('HTTP_FORWARDED_FOR')))       return getenv('HTTP_FORWARDED_FOR');
23
+			if (!empty(getenv('HTTP_FORWARDED_FOR'))) {
24
+				return getenv('HTTP_FORWARDED_FOR');
25
+			}
18 26
 
19
-			if (!empty(getenv('HTTP_FORWARDED')))           return getenv('HTTP_FORWARDED');
27
+			if (!empty(getenv('HTTP_FORWARDED'))) {
28
+				return getenv('HTTP_FORWARDED');
29
+			}
20 30
 
21
-			if (!empty(getenv('REMOTE_ADDR')))              return getenv('REMOTE_ADDR');
31
+			if (!empty(getenv('REMOTE_ADDR'))) {
32
+				return getenv('REMOTE_ADDR');
33
+			}
22 34
 
23 35
 			# ------------------------
24 36
 
@@ -50,9 +62,11 @@  discard block
 block discarded – undo
50 62
 
51 63
 			$file_name = (DIR_TEMPLATES . 'Exception.tpl');
52 64
 
53
-			if (false === ($contents = @file_get_contents($file_name))) $output = nl2br($exc);
54
-
55
-			else $output = $parse_contents($contents);
65
+			if (false === ($contents = @file_get_contents($file_name))) {
66
+				$output = nl2br($exc);
67
+			} else {
68
+				$output = $parse_contents($contents);
69
+			}
56 70
 
57 71
 			# Set headers
58 72
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Definition.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,9 @@
 block discarded – undo
29 29
 
30 30
 		public static function get(string $type, int $id = 0) {
31 31
 
32
-			if (!isset(self::$classes[$type])) throw new Exception\General(self::$error_message);
32
+			if (!isset(self::$classes[$type])) {
33
+				throw new Exception\General(self::$error_message);
34
+			}
33 35
 
34 36
 			$cached = isset(self::$cache[$type][$id]);
35 37
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Definition/User/Secret.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@
 block discarded – undo
14 14
 
15 15
 			# Add params
16 16
 
17
-			$this->addTextual       ('code',            true, 40, true, true, true);
18
-			$this->addTextual       ('ip',              true, 255, false, true, false);
19
-			$this->addInteger       ('time',            false, 10, 0, true, false);
17
+			$this->addTextual('code', true, 40, true, true, true);
18
+			$this->addTextual('ip', true, 255, false, true, false);
19
+			$this->addInteger('time', false, 10, 0, true, false);
20 20
 		}
21 21
 	}
22 22
 }
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Handler/Menuitem.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,9 @@
 block discarded – undo
34 34
 
35 35
 				$contents->block('parent')->block('browse')->disable();
36 36
 
37
-			} else $contents->block('parent')->block('browse')->link = $this->parent->link;
37
+			} else {
38
+				$contents->block('parent')->block('browse')->link = $this->parent->link;
39
+			}
38 40
 		}
39 41
 
40 42
 		# Add item additional data
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Handler/Page.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,9 @@
 block discarded – undo
34 34
 
35 35
 				$contents->block('parent')->block('browse')->disable();
36 36
 
37
-			} else $contents->block('parent')->block('browse')->link = $this->parent->link;
37
+			} else {
38
+				$contents->block('parent')->block('browse')->link = $this->parent->link;
39
+			}
38 40
 		}
39 41
 
40 42
 		# Add item additional data
Please login to merge, or discard this patch.