Passed
Pull Request — master (#10)
by Anton
04:10
created
www/engine/Framework/Classes/Tag/Tag.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@  discard block
 block discarded – undo
23 23
 
24 24
 			$this->name = $name;
25 25
 
26
-			foreach ($attributes as $name => $value) $this->set($name, $value);
26
+			foreach ($attributes as $name => $value) {
27
+				$this->set($name, $value);
28
+			}
27 29
 
28 30
 			$this->contents($contents);
29 31
 		}
@@ -41,9 +43,11 @@  discard block
 block discarded – undo
41 43
 
42 44
 		public function contents($contents) {
43 45
 
44
-			if ((null === $contents) || Template::isBlock($contents)) $this->contents = $contents;
45
-
46
-			else if (is_scalar($contents)) $this->contents = Template::block('$contents$')->set('contents', $contents);
46
+			if ((null === $contents) || Template::isBlock($contents)) {
47
+				$this->contents = $contents;
48
+			} else if (is_scalar($contents)) {
49
+				$this->contents = Template::block('$contents$')->set('contents', $contents);
50
+			}
47 51
 
48 52
 			# ------------------------
49 53
 
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Date/Date.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,9 +8,13 @@  discard block
 block discarded – undo
8 8
 
9 9
 		public static function validate(string $date, string $format) {
10 10
 
11
-			if (false === ($date_object = date_create_from_format($format, $date))) return false;
11
+			if (false === ($date_object = date_create_from_format($format, $date))) {
12
+				return false;
13
+			}
12 14
 
13
-			if (false === ($date_formatted = $date_object->format($format))) return false;
15
+			if (false === ($date_formatted = $date_object->format($format))) {
16
+				return false;
17
+			}
14 18
 
15 19
 			# ------------------------
16 20
 
@@ -35,7 +39,9 @@  discard block
 block discarded – undo
35 39
 
36 40
 		public static function validateYear(int $year) {
37 41
 
38
-			if (false === ($year = self::validate($year, 'Y'))) return false;
42
+			if (false === ($year = self::validate($year, 'Y'))) {
43
+				return false;
44
+			}
39 45
 
40 46
 			return (($year > '1900') ? (($year > self::year()) ? self::year() : $year) : '1900');
41 47
 		}
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Template/Asset/Loop.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,9 @@
 block discarded – undo
37 37
 
38 38
 				$group->add($block = clone($this->block));
39 39
 
40
-				if (is_array($item)) foreach ($item as $name => $value) if (is_scalar($value)) $block->set($name, $value);
40
+				if (is_array($item)) {
41
+					foreach ($item as $name => $value) if (is_scalar($value)) $block->set($name, $value);
42
+				}
41 43
 			}
42 44
 
43 45
 			# ------------------------
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Template/Asset/Group.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 
24 24
 			$contents = '';
25 25
 
26
-			foreach ($this->items as $block) $contents .= $block->contents();
26
+			foreach ($this->items as $block) {
27
+				$contents .= $block->contents();
28
+			}
27 29
 
28 30
 			# ------------------------
29 31
 
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Session/Session.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,9 @@  discard block
 block discarded – undo
8 8
 
9 9
 		public static function start(string $name, int $lifetime) {
10 10
 
11
-			if (session_id()) return true;
11
+			if (session_id()) {
12
+				return true;
13
+			}
12 14
 
13 15
 			ini_set('session.gc_maxlifetime', $lifetime);
14 16
 
@@ -46,14 +48,18 @@  discard block
 block discarded – undo
46 48
 
47 49
 		public static function set(string $name, $value) {
48 50
 
49
-			if (session_id()) $_SESSION[$name] = $value;
51
+			if (session_id()) {
52
+				$_SESSION[$name] = $value;
53
+			}
50 54
 		}
51 55
 
52 56
 		# Delete variable
53 57
 
54 58
 		public static function delete(string $name) {
55 59
 
56
-			if (session_id() && isset($_SESSION[$name])) unset($_SESSION[$name]);
60
+			if (session_id() && isset($_SESSION[$name])) {
61
+				unset($_SESSION[$name]);
62
+			}
57 63
 		}
58 64
 	}
59 65
 }
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Cookie/Cookie.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,9 @@
 block discarded – undo
31 31
 
32 32
 		public static function delete(string $name) {
33 33
 
34
-			if (isset($_COOKIE[$name])) unset($_COOKIE[$name]);
34
+			if (isset($_COOKIE[$name])) {
35
+				unset($_COOKIE[$name]);
36
+			}
35 37
 		}
36 38
 	}
37 39
 }
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Mime/Mime.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@
 block discarded – undo
10 10
 
11 11
 		private static function checkType(string $extension, string $type) {
12 12
 
13
-			if (false === ($mime = self::get($extension))) return false;
13
+			if (false === ($mime = self::get($extension))) {
14
+				return false;
15
+			}
14 16
 
15 17
 			return (preg_match('/^' . $type . '\//', $mime) ? true : false);
16 18
 		}
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@
 block discarded – undo
12 12
 
13 13
 			if (false === ($mime = self::get($extension))) return false;
14 14
 
15
-			return (preg_match(('/^' . $type . '\//'), $mime) ? true : false);
15
+			return (preg_match(('/^'.$type.'\//'), $mime) ? true : false);
16 16
 		}
17 17
 
18 18
 		# Autoloader
19 19
 
20 20
 		public static function __autoload() {
21 21
 
22
-			self::init(DIR_DATA . 'Mime.php');
22
+			self::init(DIR_DATA.'Mime.php');
23 23
 		}
24 24
 
25 25
 		# Check if extension is image
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
@@ -8,7 +8,9 @@
 block discarded – undo
8 8
 
9 9
 		private static function output($image, string $mime, callable $outputter, array $params = []) {
10 10
 
11
-			if (!is_resource($image)) return false;
11
+			if (!is_resource($image)) {
12
+				return false;
13
+			}
12 14
 
13 15
 			Headers::nocache(); Headers::content($mime);
14 16
 
Please login to merge, or discard this patch.
www/engine/Framework/Includes/Headers/Status.php 1 patch
Spacing   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -2,60 +2,60 @@
 block discarded – undo
2 2
 
3 3
 # Status codes
4 4
 
5
-define('STATUS_CODE_100',       '100');
6
-define('STATUS_CODE_101',       '101');
7
-define('STATUS_CODE_102',       '102');
5
+define('STATUS_CODE_100', '100');
6
+define('STATUS_CODE_101', '101');
7
+define('STATUS_CODE_102', '102');
8 8
 
9
-define('STATUS_CODE_200',       '200');
10
-define('STATUS_CODE_201',       '201');
11
-define('STATUS_CODE_202',       '202');
12
-define('STATUS_CODE_203',       '203');
13
-define('STATUS_CODE_204',       '204');
14
-define('STATUS_CODE_205',       '205');
15
-define('STATUS_CODE_206',       '206');
16
-define('STATUS_CODE_207',       '207');
17
-define('STATUS_CODE_226',       '226');
9
+define('STATUS_CODE_200', '200');
10
+define('STATUS_CODE_201', '201');
11
+define('STATUS_CODE_202', '202');
12
+define('STATUS_CODE_203', '203');
13
+define('STATUS_CODE_204', '204');
14
+define('STATUS_CODE_205', '205');
15
+define('STATUS_CODE_206', '206');
16
+define('STATUS_CODE_207', '207');
17
+define('STATUS_CODE_226', '226');
18 18
 
19
-define('STATUS_CODE_300',       '300');
20
-define('STATUS_CODE_301',       '301');
21
-define('STATUS_CODE_302',       '302');
22
-define('STATUS_CODE_303',       '303');
23
-define('STATUS_CODE_304',       '304');
24
-define('STATUS_CODE_305',       '305');
25
-define('STATUS_CODE_307',       '307');
19
+define('STATUS_CODE_300', '300');
20
+define('STATUS_CODE_301', '301');
21
+define('STATUS_CODE_302', '302');
22
+define('STATUS_CODE_303', '303');
23
+define('STATUS_CODE_304', '304');
24
+define('STATUS_CODE_305', '305');
25
+define('STATUS_CODE_307', '307');
26 26
 
27
-define('STATUS_CODE_400',       '400');
28
-define('STATUS_CODE_401',       '401');
29
-define('STATUS_CODE_402',       '402');
30
-define('STATUS_CODE_403',       '403');
31
-define('STATUS_CODE_404',       '404');
32
-define('STATUS_CODE_405',       '405');
33
-define('STATUS_CODE_406',       '406');
34
-define('STATUS_CODE_407',       '407');
35
-define('STATUS_CODE_408',       '408');
36
-define('STATUS_CODE_409',       '409');
37
-define('STATUS_CODE_410',       '410');
38
-define('STATUS_CODE_411',       '411');
39
-define('STATUS_CODE_412',       '412');
40
-define('STATUS_CODE_413',       '413');
41
-define('STATUS_CODE_414',       '414');
42
-define('STATUS_CODE_415',       '415');
43
-define('STATUS_CODE_416',       '416');
44
-define('STATUS_CODE_417',       '417');
45
-define('STATUS_CODE_422',       '422');
46
-define('STATUS_CODE_423',       '423');
47
-define('STATUS_CODE_424',       '424');
48
-define('STATUS_CODE_425',       '425');
49
-define('STATUS_CODE_426',       '426');
50
-define('STATUS_CODE_449',       '449');
27
+define('STATUS_CODE_400', '400');
28
+define('STATUS_CODE_401', '401');
29
+define('STATUS_CODE_402', '402');
30
+define('STATUS_CODE_403', '403');
31
+define('STATUS_CODE_404', '404');
32
+define('STATUS_CODE_405', '405');
33
+define('STATUS_CODE_406', '406');
34
+define('STATUS_CODE_407', '407');
35
+define('STATUS_CODE_408', '408');
36
+define('STATUS_CODE_409', '409');
37
+define('STATUS_CODE_410', '410');
38
+define('STATUS_CODE_411', '411');
39
+define('STATUS_CODE_412', '412');
40
+define('STATUS_CODE_413', '413');
41
+define('STATUS_CODE_414', '414');
42
+define('STATUS_CODE_415', '415');
43
+define('STATUS_CODE_416', '416');
44
+define('STATUS_CODE_417', '417');
45
+define('STATUS_CODE_422', '422');
46
+define('STATUS_CODE_423', '423');
47
+define('STATUS_CODE_424', '424');
48
+define('STATUS_CODE_425', '425');
49
+define('STATUS_CODE_426', '426');
50
+define('STATUS_CODE_449', '449');
51 51
 
52
-define('STATUS_CODE_500',       '500');
53
-define('STATUS_CODE_501',       '501');
54
-define('STATUS_CODE_502',       '502');
55
-define('STATUS_CODE_503',       '503');
56
-define('STATUS_CODE_504',       '504');
57
-define('STATUS_CODE_505',       '505');
58
-define('STATUS_CODE_506',       '506');
59
-define('STATUS_CODE_507',       '507');
60
-define('STATUS_CODE_509',       '509');
61
-define('STATUS_CODE_510',       '510');
52
+define('STATUS_CODE_500', '500');
53
+define('STATUS_CODE_501', '501');
54
+define('STATUS_CODE_502', '502');
55
+define('STATUS_CODE_503', '503');
56
+define('STATUS_CODE_504', '504');
57
+define('STATUS_CODE_505', '505');
58
+define('STATUS_CODE_506', '506');
59
+define('STATUS_CODE_507', '507');
60
+define('STATUS_CODE_509', '509');
61
+define('STATUS_CODE_510', '510');
Please login to merge, or discard this patch.