Passed
Push — master ( c5be4a...39e959 )
by Anton
02:44
created
www/engine/Framework/Classes/Mime/Mime.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 			if (false === ($mime = self::get($extension))) return false;
23 23
 
24
-			return (preg_match(('/^' . $type . '\//'), $mime) ? true : false);
24
+			return (preg_match(('/^'.$type.'\//'), $mime) ? true : false);
25 25
 		}
26 26
 
27 27
 		/**
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 		public static function __autoload() {
32 32
 
33
-			self::init(DIR_DATA . 'Mime.php');
33
+			self::init(DIR_DATA.'Mime.php');
34 34
 		}
35 35
 
36 36
 		/**
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@
 block discarded – undo
19 19
 
20 20
 		private static function checkType(string $extension, string $type) : bool {
21 21
 
22
-			if (false === ($mime = self::get($extension))) return false;
22
+			if (false === ($mime = self::get($extension))) {
23
+				return false;
24
+			}
23 25
 
24 26
 			return (preg_match(('/^' . $type . '\//'), $mime) ? true : false);
25 27
 		}
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Language/Language.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@  discard block
 block discarded – undo
19 19
 
20 20
 		private static function addPhrase(string $name, string $value) {
21 21
 
22
-			if (preg_match(REGEX_LANGUAGE_PHRASE_NAME, $name)) self::$phrases[$name] = $value;
22
+			if (preg_match(REGEX_LANGUAGE_PHRASE_NAME, $name)) {
23
+				self::$phrases[$name] = $value;
24
+			}
23 25
 		}
24 26
 
25 27
 		/**
@@ -30,9 +32,13 @@  discard block
 block discarded – undo
30 32
 
31 33
 		public static function load(string $file_name) : bool {
32 34
 
33
-			if (!is_array($phrases = Explorer::include($file_name))) return false;
35
+			if (!is_array($phrases = Explorer::include($file_name))) {
36
+				return false;
37
+			}
34 38
 
35
-			foreach ($phrases as $name => $value) if (is_scalar($value)) self::addPhrase($name, $value);
39
+			foreach ($phrases as $name => $value) {
40
+				if (is_scalar($value)) self::addPhrase($name, $value);
41
+			}
36 42
 
37 43
 			# ------------------------
38 44
 
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Image/Image.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@
 block discarded – undo
19 19
 
20 20
 		private static function output($image, string $mime, callable $outputter, array $params = []) : bool {
21 21
 
22
-			if (!is_resource($image)) return false;
22
+			if (!is_resource($image)) {
23
+				return false;
24
+			}
23 25
 
24 26
 			Headers::sendNoCache(); Headers::sendContent($mime);
25 27
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Collection/Pages.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -23,34 +23,34 @@
 block discarded – undo
23 23
 
24 24
 		protected function init() {
25 25
 
26
-			$this->config->addParam('active', '', function (bool $active) {
26
+			$this->config->addParam('active', '', function(bool $active) {
27 27
 
28
-				return ($active ? ("ent.visibility = " . VISIBILITY_PUBLISHED . " AND ent.locked = 0") : '');
28
+				return ($active ? ("ent.visibility = ".VISIBILITY_PUBLISHED." AND ent.locked = 0") : '');
29 29
 			});
30 30
 
31
-			$this->config->addParam('rank', '', function (int $rank = null) {
31
+			$this->config->addParam('rank', '', function(int $rank = null) {
32 32
 
33
-				return ((null !== $rank) ? ("ent.access <= " . $rank) : '');
33
+				return ((null !== $rank) ? ("ent.access <= ".$rank) : '');
34 34
 			});
35 35
 
36
-			$this->config->addParam('time_created >=', '', function (int $time) {
36
+			$this->config->addParam('time_created >=', '', function(int $time) {
37 37
 
38
-				return ((0 < $time) ? ("ent.time_created >= " . $time) : '');
38
+				return ((0 < $time) ? ("ent.time_created >= ".$time) : '');
39 39
 			});
40 40
 
41
-			$this->config->addParam('time_created <=', '', function (int $time) {
41
+			$this->config->addParam('time_created <=', '', function(int $time) {
42 42
 
43
-				return ((0 < $time) ? ("ent.time_created <= " . $time) : '');
43
+				return ((0 < $time) ? ("ent.time_created <= ".$time) : '');
44 44
 			});
45 45
 
46
-			$this->config->addParam('time_modified >=', '', function (int $time) {
46
+			$this->config->addParam('time_modified >=', '', function(int $time) {
47 47
 
48
-				return ((0 < $time) ? ("ent.time_modified >= " . $time) : '');
48
+				return ((0 < $time) ? ("ent.time_modified >= ".$time) : '');
49 49
 			});
50 50
 
51
-			$this->config->addParam('time_modified <=', '', function (int $time) {
51
+			$this->config->addParam('time_modified <=', '', function(int $time) {
52 52
 
53
-				return ((0 < $time) ? ("ent.time_modified <= " . $time) : '');
53
+				return ((0 < $time) ? ("ent.time_modified <= ".$time) : '');
54 54
 			});
55 55
 		}
56 56
 	}
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Definition/Variable.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,14 +23,14 @@
 block discarded – undo
23 23
 
24 24
 			# Add params
25 25
 
26
-			$this->params->addTextual       ('name',                true, 255, false, '');
27
-			$this->params->addTextual       ('title',               true, 255, false, '');
28
-			$this->params->addTextual       ('value',               true, 255, false, '');
26
+			$this->params->addTextual('name', true, 255, false, '');
27
+			$this->params->addTextual('title', true, 255, false, '');
28
+			$this->params->addTextual('value', true, 255, false, '');
29 29
 
30 30
 			# Add indexes
31 31
 
32
-			$this->indexes->add             ('name',                'UNIQUE');
33
-			$this->indexes->add             ('title');
32
+			$this->indexes->add('name', 'UNIQUE');
33
+			$this->indexes->add('title');
34 34
 		}
35 35
 	}
36 36
 }
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Definition/Widget.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,16 +23,16 @@
 block discarded – undo
23 23
 
24 24
 			# Add params
25 25
 
26
-			$this->params->addBoolean       ('active',              false);
27
-			$this->params->addTextual       ('name',                true, 255, false, '');
28
-			$this->params->addTextual       ('title',               true, 255, false, '');
29
-			$this->params->addTextual       ('contents',            false, 0, false, '');
26
+			$this->params->addBoolean('active', false);
27
+			$this->params->addTextual('name', true, 255, false, '');
28
+			$this->params->addTextual('title', true, 255, false, '');
29
+			$this->params->addTextual('contents', false, 0, false, '');
30 30
 
31 31
 			# Add indexes
32 32
 
33
-			$this->indexes->add             ('active');
34
-			$this->indexes->add             ('name',                'UNIQUE');
35
-			$this->indexes->add             ('title');
33
+			$this->indexes->add('active');
34
+			$this->indexes->add('name', 'UNIQUE');
35
+			$this->indexes->add('title');
36 36
 		}
37 37
 	}
38 38
 }
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Definition/User.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -23,27 +23,27 @@
 block discarded – undo
23 23
 
24 24
 			# Add params
25 25
 
26
-			$this->params->addInteger       ('rank',                true, 1, true, RANK_GUEST);
27
-			$this->params->addTextual       ('name',                true, 16, false, '');
28
-			$this->params->addTextual       ('email',               true, 128, false, '');
29
-			$this->params->addTextual       ('auth_key',            true, 40, true, '');
30
-			$this->params->addTextual       ('password',            true, 40, true, '');
31
-			$this->params->addTextual       ('first_name',          true, 255, false, '');
32
-			$this->params->addTextual       ('last_name',           true, 255, false, '');
33
-			$this->params->addInteger       ('sex',                 true, 1, true, SEX_NOT_SELECTED);
34
-			$this->params->addTextual       ('city',                true, 255, false, '');
35
-			$this->params->addTextual       ('country',             true, 2, false, '');
36
-			$this->params->addTextual       ('timezone',            true, 40, false, '');
37
-			$this->params->addInteger       ('time_registered',     false, 10, true, 0);
38
-			$this->params->addInteger       ('time_logged',         false, 10, true, 0);
26
+			$this->params->addInteger('rank', true, 1, true, RANK_GUEST);
27
+			$this->params->addTextual('name', true, 16, false, '');
28
+			$this->params->addTextual('email', true, 128, false, '');
29
+			$this->params->addTextual('auth_key', true, 40, true, '');
30
+			$this->params->addTextual('password', true, 40, true, '');
31
+			$this->params->addTextual('first_name', true, 255, false, '');
32
+			$this->params->addTextual('last_name', true, 255, false, '');
33
+			$this->params->addInteger('sex', true, 1, true, SEX_NOT_SELECTED);
34
+			$this->params->addTextual('city', true, 255, false, '');
35
+			$this->params->addTextual('country', true, 2, false, '');
36
+			$this->params->addTextual('timezone', true, 40, false, '');
37
+			$this->params->addInteger('time_registered', false, 10, true, 0);
38
+			$this->params->addInteger('time_logged', false, 10, true, 0);
39 39
 
40 40
 			# Add indexes
41 41
 
42
-			$this->indexes->add             ('rank');
43
-			$this->indexes->add             ('name',                'UNIQUE');
44
-			$this->indexes->add             ('email',               'UNIQUE');
45
-			$this->indexes->add             ('time_registered');
46
-			$this->indexes->add             ('time_logged');
42
+			$this->indexes->add('rank');
43
+			$this->indexes->add('name', 'UNIQUE');
44
+			$this->indexes->add('email', 'UNIQUE');
45
+			$this->indexes->add('time_registered');
46
+			$this->indexes->add('time_logged');
47 47
 		}
48 48
 	}
49 49
 }
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Definition/Page.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -23,29 +23,29 @@
 block discarded – undo
23 23
 
24 24
 			# Add params
25 25
 
26
-			$this->params->addInteger       ('visibility',          true, 1, true, VISIBILITY_DRAFT);
27
-			$this->params->addInteger       ('access',              true, 1, true, ACCESS_PUBLIC);
28
-			$this->params->addBoolean       ('locked',              true);
29
-			$this->params->addTextual       ('slug',                true, 255, false, '');
30
-			$this->params->addTextual       ('name',                true, 255, false, '');
31
-			$this->params->addTextual       ('title',               true, 255, false, '');
32
-			$this->params->addTextual       ('contents',            false, 0, false, '');
33
-			$this->params->addTextual       ('description',         false, 0, false, '');
34
-			$this->params->addTextual       ('keywords',            false, 0, false, '');
35
-			$this->params->addBoolean       ('robots_index',        false);
36
-			$this->params->addBoolean       ('robots_follow',       false);
37
-			$this->params->addInteger       ('time_created',        false, 10, true, 0);
38
-			$this->params->addInteger       ('time_modified',       false, 10, true, 0);
26
+			$this->params->addInteger('visibility', true, 1, true, VISIBILITY_DRAFT);
27
+			$this->params->addInteger('access', true, 1, true, ACCESS_PUBLIC);
28
+			$this->params->addBoolean('locked', true);
29
+			$this->params->addTextual('slug', true, 255, false, '');
30
+			$this->params->addTextual('name', true, 255, false, '');
31
+			$this->params->addTextual('title', true, 255, false, '');
32
+			$this->params->addTextual('contents', false, 0, false, '');
33
+			$this->params->addTextual('description', false, 0, false, '');
34
+			$this->params->addTextual('keywords', false, 0, false, '');
35
+			$this->params->addBoolean('robots_index', false);
36
+			$this->params->addBoolean('robots_follow', false);
37
+			$this->params->addInteger('time_created', false, 10, true, 0);
38
+			$this->params->addInteger('time_modified', false, 10, true, 0);
39 39
 
40 40
 			# Add indexes
41 41
 
42
-			$this->indexes->add             ('visibility');
43
-			$this->indexes->add             ('access');
44
-			$this->indexes->add             ('slug');
45
-			$this->indexes->add             ('name');
46
-			$this->indexes->add             ('title');
47
-			$this->indexes->add             ('time_created');
48
-			$this->indexes->add             ('time_modified');
42
+			$this->indexes->add('visibility');
43
+			$this->indexes->add('access');
44
+			$this->indexes->add('slug');
45
+			$this->indexes->add('name');
46
+			$this->indexes->add('title');
47
+			$this->indexes->add('time_created');
48
+			$this->indexes->add('time_modified');
49 49
 		}
50 50
 	}
51 51
 }
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Definition/User/Secret.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,19 +23,19 @@
 block discarded – undo
23 23
 
24 24
 			# Add params
25 25
 
26
-			$this->params->addTextual       ('code',                true, 40, true, '');
27
-			$this->params->addTextual       ('ip',                  true, 255, false, '');
28
-			$this->params->addInteger       ('time',                false, 10, true, 0);
26
+			$this->params->addTextual('code', true, 40, true, '');
27
+			$this->params->addTextual('ip', true, 255, false, '');
28
+			$this->params->addInteger('time', false, 10, true, 0);
29 29
 
30 30
 			# Add indexes
31 31
 
32
-			$this->indexes->add             ('code',                'UNIQUE');
33
-			$this->indexes->add             ('ip');
34
-			$this->indexes->add             ('time');
32
+			$this->indexes->add('code', 'UNIQUE');
33
+			$this->indexes->add('ip');
34
+			$this->indexes->add('time');
35 35
 
36 36
 			# Add foreign keys
37 37
 
38
-			$this->foreigns->add            ('id',                  TABLE_USERS, 'id', 'CASCADE', 'RESTRICT');
38
+			$this->foreigns->add('id', TABLE_USERS, 'id', 'CASCADE', 'RESTRICT');
39 39
 		}
40 40
 	}
41 41
 }
Please login to merge, or discard this patch.