Passed
Push — master ( 2f56fd...c7e98d )
by Anton
05:11 queued 01:55
created
www/engine/Framework/Classes/Tag/Tag.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
 
118 118
 			$block = clone (self::$block ?? (self::$block = Template::createBlock(
119 119
 
120
-				'<$name${ for:attributes } $name$="$value$"{ / for:attributes }>' .
120
+				'<$name${ for:attributes } $name$="$value$"{ / for:attributes }>'.
121 121
 
122 122
 				'{ block:contents / }$contents${ ! block:closing }</$name$>{ / block:closing }'
123 123
 			)));
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,9 @@  discard block
 block discarded – undo
58 58
 
59 59
 		public function setAttributes(array $attributes) : Tag {
60 60
 
61
-			foreach ($attributes as $name => $value) if (is_scalar($value)) $this->setAttribute($name, $value);
61
+			foreach ($attributes as $name => $value) {
62
+				if (is_scalar($value)) $this->setAttribute($name, $value);
63
+			}
62 64
 
63 65
 			return $this;
64 66
 		}
@@ -71,7 +73,9 @@  discard block
 block discarded – undo
71 73
 
72 74
 		public function setContents($contents) : Tag {
73 75
 
74
-			if (Template::isBlock($contents) || is_scalar($contents) || is_null($contents)) $this->contents = $contents;
76
+			if (Template::isBlock($contents) || is_scalar($contents) || is_null($contents)) {
77
+				$this->contents = $contents;
78
+			}
75 79
 
76 80
 			return $this;
77 81
 		}
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Template/Group.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,9 @@  discard block
 block discarded – undo
28 28
 
29 29
 		public function __clone() {
30 30
 
31
-			foreach ($this->items as $name => $item) $this->items[$name] = clone $item;
31
+			foreach ($this->items as $name => $item) {
32
+				$this->items[$name] = clone $item;
33
+			}
32 34
 		}
33 35
 
34 36
 		/**
@@ -52,7 +54,9 @@  discard block
 block discarded – undo
52 54
 
53 55
 		public function addItems(array $items) : Group {
54 56
 
55
- 			foreach ($items as $item) if ($item instanceof Block) $this->addItem($item);
57
+ 			foreach ($items as $item) {
58
+ 				if ($item instanceof Block) $this->addItem($item);
59
+ 			}
56 60
 
57 61
  			return $this;
58 62
  		}
@@ -111,7 +115,9 @@  discard block
 block discarded – undo
111 115
 
112 116
 			# Process items
113 117
 
114
-			foreach ($this->items as $block) $contents .= $block->getContents();
118
+			foreach ($this->items as $block) {
119
+				$contents .= $block->getContents();
120
+			}
115 121
 
116 122
 			# ------------------------
117 123
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Controller/Variable.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,13 +29,19 @@  discard block
 block discarded – undo
29 29
 
30 30
 			# Validate name
31 31
 
32
-			if (false === ($name = Validate::templateComponentName($name))) return ['name', 'VARIABLE_ERROR_NAME_INVALID'];
32
+			if (false === ($name = Validate::templateComponentName($name))) {
33
+				return ['name', 'VARIABLE_ERROR_NAME_INVALID'];
34
+			}
33 35
 
34 36
 			# Check name exists
35 37
 
36
-			if (false === ($check_name = $this->variable->check($name, 'name'))) return 'VARIABLE_ERROR_MODIFY';
38
+			if (false === ($check_name = $this->variable->check($name, 'name'))) {
39
+				return 'VARIABLE_ERROR_MODIFY';
40
+			}
37 41
 
38
-			if ($check_name === 1) return ['name', 'VARIABLE_ERROR_NAME_DUPLICATE'];
42
+			if ($check_name === 1) {
43
+				return ['name', 'VARIABLE_ERROR_NAME_DUPLICATE'];
44
+			}
39 45
 
40 46
 			# Modify variable
41 47
 
@@ -47,7 +53,9 @@  discard block
 block discarded – undo
47 53
 
48 54
 			$modifier = ((0 === $this->variable->id) ? 'create' : 'edit');
49 55
 
50
-			if (!$this->variable->$modifier($data)) return 'VARIABLE_ERROR_MODIFY';
56
+			if (!$this->variable->$modifier($data)) {
57
+				return 'VARIABLE_ERROR_MODIFY';
58
+			}
51 59
 
52 60
 			# ------------------------
53 61
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Controller/Widget.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,13 +29,19 @@  discard block
 block discarded – undo
29 29
 
30 30
 			# Validate name
31 31
 
32
-			if (false === ($name = Validate::templateComponentName($name))) return ['name', 'WIDGET_ERROR_NAME_INVALID'];
32
+			if (false === ($name = Validate::templateComponentName($name))) {
33
+				return ['name', 'WIDGET_ERROR_NAME_INVALID'];
34
+			}
33 35
 
34 36
 			# Check name exists
35 37
 
36
-			if (false === ($check_name = $this->widget->check($name, 'name'))) return 'WIDGET_ERROR_MODIFY';
38
+			if (false === ($check_name = $this->widget->check($name, 'name'))) {
39
+				return 'WIDGET_ERROR_MODIFY';
40
+			}
37 41
 
38
-			if ($check_name === 1) return ['name', 'WIDGET_ERROR_NAME_DUPLICATE'];
42
+			if ($check_name === 1) {
43
+				return ['name', 'WIDGET_ERROR_NAME_DUPLICATE'];
44
+			}
39 45
 
40 46
 			# Modify widget
41 47
 
@@ -48,7 +54,9 @@  discard block
 block discarded – undo
48 54
 
49 55
 			$modifier = ((0 === $this->widget->id) ? 'create' : 'edit');
50 56
 
51
-			if (!$this->widget->$modifier($data)) return 'WIDGET_ERROR_MODIFY';
57
+			if (!$this->widget->$modifier($data)) {
58
+				return 'WIDGET_ERROR_MODIFY';
59
+			}
52 60
 
53 61
 			# ------------------------
54 62
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Utils/Map.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 
68 68
 			if (false === ($handler = self::parseString($route['handler'], REGEX_MAP_ITEM_HANDLER))) return;
69 69
 
70
-			self::$routes['/' . implode('/', $path)] = ('Addons\\' . $name . '\\' . implode('\\', $handler));
70
+			self::$routes['/'.implode('/', $path)] = ('Addons\\'.$name.'\\'.implode('\\', $handler));
71 71
 		}
72 72
 
73 73
 		# Parse item
Please login to merge, or discard this patch.
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,9 @@  discard block
 block discarded – undo
52 52
 
53 53
 			$parts = preg_split('/\//', $string, 0, PREG_SPLIT_NO_EMPTY);
54 54
 
55
-			foreach ($parts as $name) if (!preg_match($regex, $name)) return false;
55
+			foreach ($parts as $name) {
56
+				if (!preg_match($regex, $name)) return false;
57
+			}
56 58
 
57 59
 			# ------------------------
58 60
 
@@ -63,9 +65,13 @@  discard block
 block discarded – undo
63 65
 
64 66
 		private static function parseRoute(string $name, array $route) {
65 67
 
66
-			if (false === ($path = self::parseString($route['path'], REGEX_MAP_ITEM_PATH))) return;
68
+			if (false === ($path = self::parseString($route['path'], REGEX_MAP_ITEM_PATH))) {
69
+				return;
70
+			}
67 71
 
68
-			if (false === ($handler = self::parseString($route['handler'], REGEX_MAP_ITEM_HANDLER))) return;
72
+			if (false === ($handler = self::parseString($route['handler'], REGEX_MAP_ITEM_HANDLER))) {
73
+				return;
74
+			}
69 75
 
70 76
 			self::$routes['/' . implode('/', $path)] = ('Addons\\' . $name . '\\' . implode('\\', $handler));
71 77
 		}
@@ -74,14 +80,18 @@  discard block
 block discarded – undo
74 80
 
75 81
 		private static function parseItem(array $item) {
76 82
 
77
-			foreach ($item['routes'] as $route) self::parseRoute($item['name'], $route);
83
+			foreach ($item['routes'] as $route) {
84
+				self::parseRoute($item['name'], $route);
85
+			}
78 86
 		}
79 87
 
80 88
 		# Autoloader
81 89
 
82 90
 		public static function __autoload() {
83 91
 
84
-			foreach (Extend\Addons::items() as $item) self::parseItem($item);
92
+			foreach (Extend\Addons::items() as $item) {
93
+				self::parseItem($item);
94
+			}
85 95
 		}
86 96
 
87 97
 		# Get handler by url
Please login to merge, or discard this patch.
www/engine/System/Includes/Constants.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -2,68 +2,68 @@
 block discarded – undo
2 2
 
3 3
 # Cadmium
4 4
 
5
-define('CADMIUM_NAME',                              'Cadmium CMS');
6
-define('CADMIUM_HOME',                              'http://cadmium-cms.com');
5
+define('CADMIUM_NAME', 'Cadmium CMS');
6
+define('CADMIUM_HOME', 'http://cadmium-cms.com');
7 7
 
8
-define('CADMIUM_VERSION',                           '0.4.1');
9
-define('CADMIUM_COPY',                              '2016');
8
+define('CADMIUM_VERSION', '0.4.1');
9
+define('CADMIUM_COPY', '2016');
10 10
 
11 11
 # External
12 12
 
13
-define('JQUERY_VERSION',                            '3.1.1');
14
-define('SEMANTIC_UI_VERSION',                       '2.2.6');
15
-define('CKEDITOR_VERSION',                          '4.5.11');
13
+define('JQUERY_VERSION', '3.1.1');
14
+define('SEMANTIC_UI_VERSION', '2.2.6');
15
+define('CKEDITOR_VERSION', '4.5.11');
16 16
 
17 17
 # Sections
18 18
 
19
-define('SECTION_ADMIN',                             'admin');
20
-define('SECTION_SITE',                              'site');
19
+define('SECTION_ADMIN', 'admin');
20
+define('SECTION_SITE', 'site');
21 21
 
22 22
 # Filemanager types
23 23
 
24
-define('FILEMANAGER_TYPE_DIR',                      'dir');
25
-define('FILEMANAGER_TYPE_FILE',                     'file');
24
+define('FILEMANAGER_TYPE_DIR', 'dir');
25
+define('FILEMANAGER_TYPE_FILE', 'file');
26 26
 
27 27
 # Access
28 28
 
29
-define('ACCESS_PUBLIC',                             0);
30
-define('ACCESS_REGISTERED',                         1);
31
-define('ACCESS_ADMINISTRATOR',                      2);
29
+define('ACCESS_PUBLIC', 0);
30
+define('ACCESS_REGISTERED', 1);
31
+define('ACCESS_ADMINISTRATOR', 2);
32 32
 
33 33
 # Frequency
34 34
 
35
-define('FREQUENCY_ALWAYS',                          'always');
36
-define('FREQUENCY_HOURLY',                          'hourly');
37
-define('FREQUENCY_DAILY',                           'daily');
38
-define('FREQUENCY_WEEKLY',                          'weekly');
39
-define('FREQUENCY_MONTHLY',                         'monthly');
40
-define('FREQUENCY_YEARLY',                          'yearly');
41
-define('FREQUENCY_NEVER',                           'never');
35
+define('FREQUENCY_ALWAYS', 'always');
36
+define('FREQUENCY_HOURLY', 'hourly');
37
+define('FREQUENCY_DAILY', 'daily');
38
+define('FREQUENCY_WEEKLY', 'weekly');
39
+define('FREQUENCY_MONTHLY', 'monthly');
40
+define('FREQUENCY_YEARLY', 'yearly');
41
+define('FREQUENCY_NEVER', 'never');
42 42
 
43 43
 # Rank
44 44
 
45
-define('RANK_GUEST',                                0);
46
-define('RANK_USER',                                 1);
47
-define('RANK_ADMINISTRATOR',                        2);
45
+define('RANK_GUEST', 0);
46
+define('RANK_USER', 1);
47
+define('RANK_ADMINISTRATOR', 2);
48 48
 
49 49
 # Sex
50 50
 
51
-define('SEX_NOT_SELECTED',                          0);
52
-define('SEX_MALE',                                  1);
53
-define('SEX_FEMALE',                                2);
51
+define('SEX_NOT_SELECTED', 0);
52
+define('SEX_MALE', 1);
53
+define('SEX_FEMALE', 2);
54 54
 
55 55
 # Status
56 56
 
57
-define('STATUS_ONLINE',                             0);
58
-define('STATUS_MAINTENANCE',                        1);
59
-define('STATUS_UPDATE',                             2);
57
+define('STATUS_ONLINE', 0);
58
+define('STATUS_MAINTENANCE', 1);
59
+define('STATUS_UPDATE', 2);
60 60
 
61 61
 # Target
62 62
 
63
-define('TARGET_SELF',                               0);
64
-define('TARGET_BLANK',                              1);
63
+define('TARGET_SELF', 0);
64
+define('TARGET_BLANK', 1);
65 65
 
66 66
 # Visibility
67 67
 
68
-define('VISIBILITY_DRAFT',                          0);
69
-define('VISIBILITY_PUBLISHED',                      1);
68
+define('VISIBILITY_DRAFT', 0);
69
+define('VISIBILITY_PUBLISHED', 1);
Please login to merge, or discard this patch.
www/engine/System/Main.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -2,32 +2,32 @@
 block discarded – undo
2 2
 
3 3
 # Define constants
4 4
 
5
-define('DIR_SYSTEM',                (dirname(__FILE__) . '/'));
5
+define('DIR_SYSTEM', (dirname(__FILE__).'/'));
6 6
 
7
-define('DIR_SYSTEM_CLASSES',        (DIR_SYSTEM . 'Classes/'));
8
-define('DIR_SYSTEM_DATA',           (DIR_SYSTEM . 'Data/'));
9
-define('DIR_SYSTEM_INCLUDES',       (DIR_SYSTEM . 'Includes/'));
10
-define('DIR_SYSTEM_LANGUAGES',      (DIR_SYSTEM . 'Languages/'));
11
-define('DIR_SYSTEM_TEMPLATES',      (DIR_SYSTEM . 'Templates/'));
7
+define('DIR_SYSTEM_CLASSES', (DIR_SYSTEM.'Classes/'));
8
+define('DIR_SYSTEM_DATA', (DIR_SYSTEM.'Data/'));
9
+define('DIR_SYSTEM_INCLUDES', (DIR_SYSTEM.'Includes/'));
10
+define('DIR_SYSTEM_LANGUAGES', (DIR_SYSTEM.'Languages/'));
11
+define('DIR_SYSTEM_TEMPLATES', (DIR_SYSTEM.'Templates/'));
12 12
 
13 13
 # Require classes
14 14
 
15
-require_once (DIR_SYSTEM . 'Exception.php');
15
+require_once (DIR_SYSTEM.'Exception.php');
16 16
 
17 17
 # Require configuration
18 18
 
19
-require_once (DIR_SYSTEM_INCLUDES . 'Config.php');
20
-require_once (DIR_SYSTEM_INCLUDES . 'Constants.php');
21
-require_once (DIR_SYSTEM_INCLUDES . 'Regex.php');
22
-require_once (DIR_SYSTEM_INCLUDES . 'Tables.php');
19
+require_once (DIR_SYSTEM_INCLUDES.'Config.php');
20
+require_once (DIR_SYSTEM_INCLUDES.'Constants.php');
21
+require_once (DIR_SYSTEM_INCLUDES.'Regex.php');
22
+require_once (DIR_SYSTEM_INCLUDES.'Tables.php');
23 23
 
24 24
 # Process environment variables
25 25
 
26
-define('HTTP_MOD_REWRITE',      (getenv('HTTP_MOD_REWRITE') === 'on'));
26
+define('HTTP_MOD_REWRITE', (getenv('HTTP_MOD_REWRITE') === 'on'));
27 27
 
28
-define('INSTALL_PATH',          rtrim(getenv('INSTALL_PATH'), '/'));
28
+define('INSTALL_PATH', rtrim(getenv('INSTALL_PATH'), '/'));
29 29
 
30
-define('DEBUG_MODE',            @file_exists(DIR_SYSTEM_DATA . '.debug'));
30
+define('DEBUG_MODE', @file_exists(DIR_SYSTEM_DATA.'.debug'));
31 31
 
32 32
 # Set error reporting
33 33
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,4 +31,6 @@
 block discarded – undo
31 31
 
32 32
 # Set error reporting
33 33
 
34
-if (DEBUG_MODE) error_reporting(E_ALL);
34
+if (DEBUG_MODE) {
35
+	error_reporting(E_ALL);
36
+}
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Extend/Utils/Handler/Basic.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,9 +32,13 @@  discard block
 block discarded – undo
32 32
 
33 33
 				$param = static::$param[$this->loader->section()]; $name = Request::post('name');
34 34
 
35
-				if (false === Settings::set($param, $name)) return $ajax->setError(Language::get(static::$error_activate));
35
+				if (false === Settings::set($param, $name)) {
36
+					return $ajax->setError(Language::get(static::$error_activate));
37
+				}
36 38
 
37
-				if (false === Settings::save()) return $ajax->setError(Language::get(static::$error_save));
39
+				if (false === Settings::save()) {
40
+					return $ajax->setError(Language::get(static::$error_save));
41
+				}
38 42
 
39 43
 			} else if (Request::post('action') === 'list') {
40 44
 
@@ -52,7 +56,9 @@  discard block
 block discarded – undo
52 56
 
53 57
 			$this->loader = new static::$loader_class(Request::get('list'));
54 58
 
55
-			if (Request::isAjax()) return $this->handleAjax();
59
+			if (Request::isAjax()) {
60
+				return $this->handleAjax();
61
+			}
56 62
 
57 63
 			# ------------------------
58 64
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Informer/Handler/Information.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
 			# Set system entries
44 44
 
45
-			$contents->system_version       = CADMIUM_VERSION;
45
+			$contents->system_version = CADMIUM_VERSION;
46 46
 
47 47
 			# Set external entries
48 48
 
Please login to merge, or discard this patch.