Test Failed
Push — master ( 7a2a91...e06943 )
by Federico
02:27
created
dist/jate/functions/array.php 3 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -11,6 +11,10 @@
 block discarded – undo
11 11
 	function arrayHtmlParser($_array) {
12 12
 		return travelStringArray($_array,"htmlParser");
13 13
 	}
14
+
15
+	/**
16
+	 * @param string $_function
17
+	 */
14 18
 	function travelStringArray ( $_array, $_function ) {
15 19
 		if (is_array($_array)) {
16 20
 			foreach ($_array as $k => $v) {
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,27 +1,27 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	function utf8ize($_array) {
3
-		return travelStringArray($_array,"utf8_encode");
3
+		return travelStringArray($_array, "utf8_encode");
4 4
 	}
5 5
 	function unutf8ize($_array) {
6
-		return travelStringArray($_array,"utf8_decode");
6
+		return travelStringArray($_array, "utf8_decode");
7 7
 	}
8 8
 	function arraySlash($_array) {
9
-		return travelStringArray($_array,"addslashes");
9
+		return travelStringArray($_array, "addslashes");
10 10
 	}
11 11
 	function arrayHtmlParser($_array) {
12
-		return travelStringArray($_array,"htmlParser");
12
+		return travelStringArray($_array, "htmlParser");
13 13
 	}
14
-	function travelStringArray ( $_array, $_function ) {
14
+	function travelStringArray($_array, $_function) {
15 15
 		if (is_array($_array)) {
16 16
 			foreach ($_array as $k => $v) {
17 17
 				$_array[$k] = travelStringArray($v, $_function);
18 18
 			}
19
-		} else if (is_string ($_array)) {
20
-			return call_user_func($_function,$_array);
19
+		} else if (is_string($_array)) {
20
+			return call_user_func($_function, $_array);
21 21
 		}
22 22
 		return $_array;
23 23
 	}
24
-	function arrayDepth( $_array ) {
24
+	function arrayDepth($_array) {
25 25
 		$maxDepth = 1;
26 26
 		foreach ($_array as $value) {
27 27
 			if (is_array($value)) {
@@ -33,12 +33,12 @@  discard block
 block discarded – undo
33 33
 		}
34 34
 		return $maxDepth;
35 35
 	}
36
-	function arrayDump( $_array, $_name = "Array", $_tab = "&nbsp;&nbsp;" ) {
36
+	function arrayDump($_array, $_name = "Array", $_tab = "&nbsp;&nbsp;") {
37 37
 			$position = preg_replace('/&nbsp;&nbsp;/', '', $_tab, 1);
38 38
 			echo "$position<span style=\"color:rgb(230,0,0)\">$_name:</span><br>";
39 39
 			foreach ($_array as $k => $i)
40
-				if(is_array($i))
41
-					arrayDump( $i, $k, "&nbsp;&nbsp;$_tab" );
40
+				if (is_array($i))
41
+					arrayDump($i, $k, "&nbsp;&nbsp;$_tab");
42 42
 				else
43 43
 					echo "$_tab<b>$k:</b> $i<br>";
44 44
 		}
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,10 +36,12 @@
 block discarded – undo
36 36
 	function arrayDump( $_array, $_name = "Array", $_tab = "&nbsp;&nbsp;" ) {
37 37
 			$position = preg_replace('/&nbsp;&nbsp;/', '', $_tab, 1);
38 38
 			echo "$position<span style=\"color:rgb(230,0,0)\">$_name:</span><br>";
39
-			foreach ($_array as $k => $i)
40
-				if(is_array($i))
39
+			foreach ($_array as $k => $i) {
40
+							if(is_array($i))
41 41
 					arrayDump( $i, $k, "&nbsp;&nbsp;$_tab" );
42
-				else
43
-					echo "$_tab<b>$k:</b> $i<br>";
42
+			}
43
+				else {
44
+									echo "$_tab<b>$k:</b> $i<br>";
45
+				}
44 46
 		}
45 47
 ?>
Please login to merge, or discard this patch.
dist/jate/functions/folder.php 3 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -17,6 +17,10 @@
 block discarded – undo
17 17
 		});
18 18
 		return $temp;
19 19
 	}
20
+
21
+	/**
22
+	 * @param Closure $_function
23
+	 */
20 24
 	function fetchInSubFolder( $_dir = "./", $_function) {
21 25
 		$temp = [];
22 26
 		if (is_dir($_dir)) {
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,41 +1,41 @@
 block discarded – undo
1 1
 <?php
2
-	function subFolder( $_dir = "./" ) {
2
+	function subFolder($_dir = "./") {
3 3
 		$temp = fetchInSubFolder($_dir, function() {
4 4
 			return true;
5 5
 		});
6 6
 		return $temp;
7 7
 	}
8
-	function subFolderFile( $_dir = "./" ) {
9
-		$temp = fetchInSubFolder($_dir, function( $_file ) {
8
+	function subFolderFile($_dir = "./") {
9
+		$temp = fetchInSubFolder($_dir, function($_file) {
10 10
 			return !is_dir($_file);
11 11
 		});
12 12
 		return $temp;
13 13
 	}
14
-	function subFolderDir( $_dir = "./" ) {
15
-		$temp = fetchInSubFolder($_dir, function( $_file ) {
14
+	function subFolderDir($_dir = "./") {
15
+		$temp = fetchInSubFolder($_dir, function($_file) {
16 16
 			return !is_file($_file);
17 17
 		});
18 18
 		return $temp;
19 19
 	}
20
-	function fetchInSubFolder( $_dir = "./", $_function) {
20
+	function fetchInSubFolder($_dir = "./", $_function) {
21 21
 		$temp = [];
22 22
 		if (is_dir($_dir)) {
23 23
 				if ($dirOpened = opendir($_dir)) {
24 24
 						while (($file = readdir($dirOpened)) !== false)
25
-								if( ($file !='.')&&($file !='..') )
26
-									if($_function($file))
27
-										array_push($temp,$file);
25
+								if (($file != '.') && ($file != '..'))
26
+									if ($_function($file))
27
+										array_push($temp, $file);
28 28
 						closedir($dirOpened);
29 29
 				}
30 30
 		}
31 31
 		return $temp;
32 32
 	}
33
-	function requireSubfolder( $_dir = "./" ) {
33
+	function requireSubfolder($_dir = "./") {
34 34
 		$temp = subFolderFile($_dir);
35 35
 		foreach ($temp as $i)
36 36
 			jRequire($_dir."/".$i);
37 37
 	}
38
-	function require_js( $_dir = "./" ) {
38
+	function require_js($_dir = "./") {
39 39
 		$tempArray = [];
40 40
 		$temp = subFolderFile($_dir);
41 41
 		foreach ($temp as $i)
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,10 +21,11 @@  discard block
 block discarded – undo
21 21
 		$temp = [];
22 22
 		if (is_dir($_dir)) {
23 23
 				if ($dirOpened = opendir($_dir)) {
24
-						while (($file = readdir($dirOpened)) !== false)
25
-								if( ($file !='.')&&($file !='..') )
24
+						while (($file = readdir($dirOpened)) !== false) {
25
+														if( ($file !='.')&&($file !='..') )
26 26
 									if($_function($file))
27 27
 										array_push($temp,$file);
28
+						}
28 29
 						closedir($dirOpened);
29 30
 				}
30 31
 		}
@@ -32,14 +33,16 @@  discard block
 block discarded – undo
32 33
 	}
33 34
 	function requireSubfolder( $_dir = "./" ) {
34 35
 		$temp = subFolderFile($_dir);
35
-		foreach ($temp as $i)
36
-			jRequire($_dir."/".$i);
36
+		foreach ($temp as $i) {
37
+					jRequire($_dir."/".$i);
38
+		}
37 39
 	}
38 40
 	function require_js( $_dir = "./" ) {
39 41
 		$tempArray = [];
40 42
 		$temp = subFolderFile($_dir);
41
-		foreach ($temp as $i)
42
-			array_push($tempArray, $_dir."/".$i);
43
+		foreach ($temp as $i) {
44
+					array_push($tempArray, $_dir."/".$i);
45
+		}
43 46
 		return $tempArray;
44 47
 	}
45 48
 ?>
Please login to merge, or discard this patch.
dist/jate/functions/string.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-	function htmlParser( $_str) {
2
+	function htmlParser($_str) {
3 3
 		return htmlentities($_str, ENT_QUOTES | ENT_IGNORE, "UTF-8");
4 4
 	}
5 5
 ?>
Please login to merge, or discard this patch.
dist/jate/functions/requirer.php 3 patches
Doc Comments   +11 added lines patch added patch discarded remove patch
@@ -1,4 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
+	/**
3
+	 * @param string $_path
4
+	 */
2 5
 	function requireComponent( $_path, $_local = true ) {
3 6
 		$path = getJFolder($_path, $_local, debug_backtrace());
4 7
 		if(file_exists($path) && isPhp($path))
@@ -6,6 +9,10 @@  discard block
 block discarded – undo
6 9
 		else
7 10
 			requireError($_path);
8 11
 	}
12
+
13
+	/**
14
+	 * @param string $_path
15
+	 */
9 16
 	function requireComponents( $_path, $_local = true ) {
10 17
 		$path = getJFolder($_path, $_local, debug_backtrace());
11 18
 		if(file_exists($path)) {
@@ -38,6 +45,10 @@  discard block
 block discarded – undo
38 45
 		$path = getJFolder($_path, $_local, debug_backtrace());
39 46
 		require_once( $path );
40 47
 	}
48
+
49
+	/**
50
+	 * @param boolean $_local
51
+	 */
41 52
 	function getJFolder( $_path, $_local, $_stack ) {
42 53
 		if($_local) {
43 54
 			$stackInfo = $_stack;
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,45 +1,45 @@
 block discarded – undo
1 1
 <?php
2
-	function requireComponent( $_path, $_local = true ) {
2
+	function requireComponent($_path, $_local = true) {
3 3
 		$path = getJFolder($_path, $_local, debug_backtrace());
4
-		if(file_exists($path) && isPhp($path))
4
+		if (file_exists($path) && isPhp($path))
5 5
 			jRequire($path, false, 0);
6 6
 		else
7 7
 			requireError($_path);
8 8
 	}
9
-	function requireComponents( $_path, $_local = true ) {
9
+	function requireComponents($_path, $_local = true) {
10 10
 		$path = getJFolder($_path, $_local, debug_backtrace());
11
-		if(file_exists($path)) {
11
+		if (file_exists($path)) {
12 12
 			$files = subFolderFile($path);
13 13
 			foreach ($files as $i) {
14
-				if(isPhp($path."/".$i))
14
+				if (isPhp($path."/".$i))
15 15
 					requireComponent($path."/".$i, false, 0);
16 16
 			}
17 17
 		} else
18 18
 			requireError($_path);
19 19
 	}
20
-	function requireError( $_path ) {
20
+	function requireError($_path) {
21 21
 		global $DEBUG;
22
-		if( $DEBUG == 1 )
22
+		if ($DEBUG == 1)
23 23
 			echo "Error load ($_path)<br>";
24 24
 	}
25
-	function isPhp ( $_file ) {
26
-		if(!is_file($_file)) return false;
25
+	function isPhp($_file) {
26
+		if (!is_file($_file)) return false;
27 27
 		$info = pathinfo($_file);
28 28
 		return ($info["extension"] == "php") || ($info["extension"] == "PHP");
29 29
 	}
30
-	function requireModules( $_path, $_local = true ) {
30
+	function requireModules($_path, $_local = true) {
31 31
 		$path = getJFolder($_path, $_local, debug_backtrace());
32 32
 		$subFolders = subFolderDir($path);
33 33
 		foreach ($subFolders as $i) {
34 34
 			requireComponents($path."/".$i, false, 0);
35 35
 		}
36 36
 	}
37
-	function jRequire( $_path, $_local = true ) {
37
+	function jRequire($_path, $_local = true) {
38 38
 		$path = getJFolder($_path, $_local, debug_backtrace());
39
-		require_once( $path );
39
+		require_once($path);
40 40
 	}
41
-	function getJFolder( $_path, $_local, $_stack ) {
42
-		if($_local) {
41
+	function getJFolder($_path, $_local, $_stack) {
42
+		if ($_local) {
43 43
 			$stackInfo = $_stack;
44 44
 			$folder = dirname($stackInfo[0]["file"]);
45 45
 			$file = "$folder/$_path";
Please login to merge, or discard this patch.
Braces   +20 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,29 +1,35 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	function requireComponent( $_path, $_local = true ) {
3 3
 		$path = getJFolder($_path, $_local, debug_backtrace());
4
-		if(file_exists($path) && isPhp($path))
5
-			jRequire($path, false, 0);
6
-		else
7
-			requireError($_path);
4
+		if(file_exists($path) && isPhp($path)) {
5
+					jRequire($path, false, 0);
6
+		} else {
7
+					requireError($_path);
8
+		}
8 9
 	}
9 10
 	function requireComponents( $_path, $_local = true ) {
10 11
 		$path = getJFolder($_path, $_local, debug_backtrace());
11 12
 		if(file_exists($path)) {
12 13
 			$files = subFolderFile($path);
13 14
 			foreach ($files as $i) {
14
-				if(isPhp($path."/".$i))
15
-					requireComponent($path."/".$i, false, 0);
15
+				if(isPhp($path."/".$i)) {
16
+									requireComponent($path."/".$i, false, 0);
17
+				}
16 18
 			}
17
-		} else
18
-			requireError($_path);
19
+		} else {
20
+					requireError($_path);
21
+		}
19 22
 	}
20 23
 	function requireError( $_path ) {
21 24
 		global $DEBUG;
22
-		if( $DEBUG == 1 )
23
-			echo "Error load ($_path)<br>";
25
+		if( $DEBUG == 1 ) {
26
+					echo "Error load ($_path)<br>";
27
+		}
24 28
 	}
25 29
 	function isPhp ( $_file ) {
26
-		if(!is_file($_file)) return false;
30
+		if(!is_file($_file)) {
31
+			return false;
32
+		}
27 33
 		$info = pathinfo($_file);
28 34
 		return ($info["extension"] == "php") || ($info["extension"] == "PHP");
29 35
 	}
@@ -43,8 +49,9 @@  discard block
 block discarded – undo
43 49
 			$stackInfo = $_stack;
44 50
 			$folder = dirname($stackInfo[0]["file"]);
45 51
 			$file = "$folder/$_path";
46
-		} else
47
-			$file = $_path;
52
+		} else {
53
+					$file = $_path;
54
+		}
48 55
 		return $file;
49 56
 	}
50 57
 ?>
Please login to merge, or discard this patch.
dist/jate/modules/Query/Query.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,10 @@
 block discarded – undo
11 11
 			$this->connection["$_name"] = $_connection;
12 12
 			$this->currentConnection = $_connection;
13 13
 
14
-			foreach ($this->modules as &$module)
15
-				if(isset($module->currentConnection))
14
+			foreach ($this->modules as &$module) {
15
+							if(isset($module->currentConnection))
16 16
 					$module->addConnection($_name, $_connection);
17
+			}
17 18
 		}
18 19
 		public function setConnection( $_name ) {
19 20
 			$this->currentConnection = $this->connection["$_name"];
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,42 +8,42 @@
 block discarded – undo
8 8
 			$this->connection = [];
9 9
 			$this->currentConnection = null;
10 10
 		}
11
-		public function addConnection( $_name, $_connection ) {
11
+		public function addConnection($_name, $_connection) {
12 12
 			$this->connection["$_name"] = $_connection;
13 13
 			$this->currentConnection = $_connection;
14 14
 
15 15
 			foreach ($this->modules as &$module)
16
-				if(isset($module->currentConnection))
16
+				if (isset($module->currentConnection))
17 17
 					$module->addConnection($_name, $_connection);
18 18
 		}
19
-		public function setConnection( $_name ) {
19
+		public function setConnection($_name) {
20 20
 			$this->currentConnection = $this->connection["$_name"];
21 21
 		}
22
-		public function query( $_query ) {
22
+		public function query($_query) {
23 23
 			$this->stdQuery($_query);
24 24
 			return true;
25 25
 		}
26
-		public function queryInsert( $_query ) {
26
+		public function queryInsert($_query) {
27 27
 			$this->stdQuery($_query);
28 28
 			return $this->currentConnection->database->lastInsertId();
29 29
 		}
30 30
 
31
-		public function queryFetch( $_query ) {
31
+		public function queryFetch($_query) {
32 32
 			$temp = $this->stdQuery($_query);
33 33
 			return $temp->fetchAll(PDO::FETCH_ASSOC);
34 34
 		}
35 35
 
36
-		public function queryArray( $_query ) {
36
+		public function queryArray($_query) {
37 37
 			$temp = $this->stdQuery($_query);
38 38
 			return $temp->fetchAll(PDO::FETCH_COLUMN, 0);
39 39
 		}
40 40
 
41
-		protected function stdQuery( $_query ) {
41
+		protected function stdQuery($_query) {
42 42
 			$database = $this->currentConnection->database;
43 43
 			$error = "Error query [$_query]";
44 44
 			$query = $database->prepare($_query);
45 45
 			$_result = $query->execute();
46
-			if(!$_result) {
46
+			if (!$_result) {
47 47
 				echo "$_query<br>";
48 48
 				echo "Something wrong: $error";
49 49
 				var_dump($query->errorInfo());
Please login to merge, or discard this patch.
dist/jate/modules/JConfig/JConfig.php 2 patches
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,10 +17,11 @@  discard block
 block discarded – undo
17 17
 		public function import( $_path, $_type = "misc" ) {
18 18
 			$data = file_get_contents($_path);
19 19
 			$data = json_decode($data);
20
-			if( $_type == "connection" )
21
-				$this->overlayConnection($data);
22
-			else
23
-				$this->overlayMisc($data);
20
+			if( $_type == "connection" ) {
21
+							$this->overlayConnection($data);
22
+			} else {
23
+							$this->overlayMisc($data);
24
+			}
24 25
 		}
25 26
 		protected function overlayConnection( $_data ) {
26 27
 			$this->connection = $this->obj2array($_data);
@@ -40,8 +41,9 @@  discard block
 block discarded – undo
40 41
 			return $return;
41 42
 		}
42 43
 		protected function importObject( $_object ) {
43
-			foreach (get_object_vars($_object) as $key => $value)
44
-				$this->$key = $value;
44
+			foreach (get_object_vars($_object) as $key => $value) {
45
+							$this->$key = $value;
46
+			}
45 47
 		}
46 48
 	}
47 49
 ?>
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -6,46 +6,46 @@
 block discarded – undo
6 6
 		public $pages;
7 7
 		public $server;
8 8
 		public function __construct() {
9
-			$this->connection["enable"]		= false;
10
-			$this->connection["user"]			= "";
9
+			$this->connection["enable"] = false;
10
+			$this->connection["user"] = "";
11 11
 			$this->connection["password"] = "";
12 12
 			$this->connection["database"] = "";
13
-			$this->connection["server"]		= "";
14
-			$this->all		= "";
13
+			$this->connection["server"] = "";
14
+			$this->all = "";
15 15
 			$this->DEBUG	= 0;
16 16
 			$this->pages	= [];
17
-			$this->server	= [];
17
+			$this->server = [];
18 18
 			$this->server["HTTP_HOST"]		= $_SERVER["HTTP_HOST"];
19
-			$this->server["REQUEST_URI"]	= $_SERVER["REQUEST_URI"];
19
+			$this->server["REQUEST_URI"] = $_SERVER["REQUEST_URI"];
20 20
 			$this->server["PHP_SELF"]			= $_SERVER["PHP_SELF"];
21 21
 			$this->server["RELATIVE"]			= str_replace("/index.php", "", $_SERVER["PHP_SELF"]);
22 22
 		}
23
-		public function import( $_path, $_type = "misc" ) {
23
+		public function import($_path, $_type = "misc") {
24 24
 			$data = file_get_contents($_path);
25 25
 			$data = json_decode($data);
26
-			if( $_type == "connection" )
26
+			if ($_type == "connection")
27 27
 				$this->overlayConnection($data);
28 28
 			else
29 29
 				$this->overlayMisc($data);
30 30
 		}
31
-		protected function overlayConnection( $_data ) {
31
+		protected function overlayConnection($_data) {
32 32
 			$this->connection = $this->obj2array($_data);
33 33
 		}
34
-		protected function overlayMisc( $_data ) {
34
+		protected function overlayMisc($_data) {
35 35
 			$this->importObject($_data);
36 36
 		}
37
-		protected function obj2array ( &$_instance ) {
38
-			$clone	= (array) $_instance;
37
+		protected function obj2array(&$_instance) {
38
+			$clone = (array) $_instance;
39 39
 			$return	= [];
40 40
 			$return['___SOURCE_KEYS_'] = $clone;
41
-			while ( list ($key, $value) = each ($clone) ) {
42
-				$temp		= explode ("\0", $key);
43
-				$newkey	= $temp[count($temp)-1];
41
+			while (list ($key, $value) = each($clone)) {
42
+				$temp		= explode("\0", $key);
43
+				$newkey = $temp[count($temp) - 1];
44 44
 				$return[$newkey] = &$return['___SOURCE_KEYS_'][$key];
45 45
 			}
46 46
 			return $return;
47 47
 		}
48
-		protected function importObject( $_object ) {
48
+		protected function importObject($_object) {
49 49
 			foreach (get_object_vars($_object) as $key => $value)
50 50
 				$this->$key = $value;
51 51
 		}
Please login to merge, or discard this patch.
dist/jate/functions/git.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2
-	function getGitLog( $_dir = "./" ) {
3
-		if(!file_exists($_dir))
2
+	function getGitLog($_dir = "./") {
3
+		if (!file_exists($_dir))
4 4
 			return [];
5 5
 		$currentDir = getcwd();
6 6
 		chdir($_dir);
7 7
 		$gitHistory	= [];
8 8
 		$gitLogs		= [];
9 9
 		$gitPath		= str_replace('\\', '/', exec("git rev-parse --show-toplevel"));
10
-		$rootPath		= str_replace('\\', '/', getcwd ());
10
+		$rootPath		= str_replace('\\', '/', getcwd());
11 11
 		$lastHash		= null;
12
-		if( $gitPath != $rootPath ) {
12
+		if ($gitPath != $rootPath) {
13 13
 			chdir($currentDir);
14 14
 			return [];
15 15
 		}
Please login to merge, or discard this patch.
Braces   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 	function getGitLog( $_dir = "./" ) {
3
-		if(!file_exists($_dir))
4
-			return [];
3
+		if(!file_exists($_dir)) {
4
+					return [];
5
+		}
5 6
 		$currentDir = getcwd();
6 7
 		chdir($_dir);
7 8
 		$gitHistory	= [];
@@ -35,19 +36,17 @@  discard block
 block discarded – undo
35 36
 						$tag = trim($tag[0]);
36 37
 						$gitHistory[$lastHash]['tag'] = $tag;
37 38
 					}
38
-				}
39
-				else if (strpos($line, 'Author') === 0) {
39
+				} else if (strpos($line, 'Author') === 0) {
40 40
 					$author = explode(':', $line);
41 41
 					$author = trim(end($author));
42 42
 					$gitHistory[$lastHash]['author'] = $author;
43
-				}
44
-				else if (strpos($line, 'Date') === 0) {
43
+				} else if (strpos($line, 'Date') === 0) {
45 44
 					$date = explode(':', $line, 2);
46 45
 					$date = trim(end($date));
47 46
 					$gitHistory[$lastHash]['date'] = date('d/m/Y H:i:s A', strtotime($date));
47
+				} else {
48
+									$gitHistory[$lastHash]['message'] .= "$line<br>";
48 49
 				}
49
-				else
50
-					$gitHistory[$lastHash]['message'] .= "$line<br>";
51 50
 			}
52 51
 		}
53 52
 		chdir($currentDir);
Please login to merge, or discard this patch.
dist/jate/modules/Router/Router.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 			parent::__construct();
5 5
 		}
6 6
 		public function getPage() {
7
-			$request	= $this->parameters["app"]->server["REQUEST_URI"];
8
-			$base			= $this->parameters["app"]->server["RELATIVE"];
7
+			$request = $this->parameters["app"]->server["REQUEST_URI"];
8
+			$base = $this->parameters["app"]->server["RELATIVE"];
9 9
 			$url			= str_replace($base, "", $request);
10 10
 			$url			= explode("/", $url);
11 11
 			return $url;
Please login to merge, or discard this patch.
dist/jate/modules/Module/Module.php 3 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -10,9 +10,9 @@  discard block
 block discarded – undo
10 10
 		public $parameters;
11 11
 		public function __construct() {
12 12
 			$this->name				= get_class($this);
13
-			$this->modules		= [];
13
+			$this->modules = [];
14 14
 			$this->files			= [];
15
-			$this->required		= [];
15
+			$this->required = [];
16 16
 			$this->data				= [];
17 17
 			$this->tags				= [];
18 18
 			$this->connection	= null;
@@ -22,43 +22,43 @@  discard block
 block discarded – undo
22 22
 		// abstract public function init();
23 23
 		// abstract public function draw();
24 24
 		public function getCss() {
25
-			return $this->getRequire("getCss",".css");
25
+			return $this->getRequire("getCss", ".css");
26 26
 		}
27 27
 		public function getJs() {
28
-			return $this->getRequire("getJs",".js");
28
+			return $this->getRequire("getJs", ".js");
29 29
 		}
30 30
 		public function getJsVariables() {
31 31
 			$temp = [];
32 32
 			foreach ($this->required as $i)
33 33
 				if (is_array($i))
34
-					array_push($temp,$i);
34
+					array_push($temp, $i);
35 35
 			foreach ($this->modules as $i)
36
-				$temp = array_merge( $temp, $i->getJsVariables() );
36
+				$temp = array_merge($temp, $i->getJsVariables());
37 37
 			foreach ($this->files as $i)
38 38
 				if (is_array($i))
39
-					array_push($temp,$i);
39
+					array_push($temp, $i);
40 40
 			return $temp;
41 41
 		}
42
-		public function addModules( $_mods ) {
42
+		public function addModules($_mods) {
43 43
 			foreach ($_mods as $value)
44 44
 				$this->addModule($value);
45 45
 		}
46
-		public function addModule( $_mod ) {
46
+		public function addModule($_mod) {
47 47
 			$this->modules[$_mod->name] = $_mod;
48 48
 			$this->modules[$_mod->name]->parameters = &$this->parameters;
49 49
 		}
50
-		public function addFiles( $_files ) {
50
+		public function addFiles($_files) {
51 51
 			foreach ($_files as $value)
52 52
 				$this->addFile($value);
53 53
 		}
54
-		public function addFile( $_file ) {
54
+		public function addFile($_file) {
55 55
 			array_push($this->files, $_file);
56 56
 		}
57
-		public function addFilesRequired( $_files ) {
57
+		public function addFilesRequired($_files) {
58 58
 			foreach ($_files as $value)
59 59
 				$this->addFileRequired($value);
60 60
 		}
61
-		public function addFileRequired( $_file ) {
61
+		public function addFileRequired($_file) {
62 62
 			array_push($this->required, $_file);
63 63
 		}
64 64
 		protected function addDipendences() {
@@ -66,16 +66,16 @@  discard block
 block discarded – undo
66 66
 			$this->tags["js"] = $this->getJs();
67 67
 			$this->tags["jsVariables"] = $this->getJsVariables();
68 68
 		}
69
-		protected function getRequire( $_function, $_extenction) {
69
+		protected function getRequire($_function, $_extenction) {
70 70
 			$temp = [];
71 71
 			foreach ($this->required as $i)
72 72
 				if (!is_array($i) && strpos($i, $_extenction) !== FALSE)
73
-					array_push($temp,$i);
73
+					array_push($temp, $i);
74 74
 			foreach ($this->modules as $i)
75
-				$temp = array_merge( $temp, $i->$_function() );
75
+				$temp = array_merge($temp, $i->$_function());
76 76
 			foreach ($this->files as $i)
77 77
 				if (!is_array($i) && strpos($i, $_extenction) !== FALSE)
78
-					array_push($temp,$i);
78
+					array_push($temp, $i);
79 79
 			return $temp;
80 80
 		}
81 81
 	}
Please login to merge, or discard this patch.
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -66,6 +66,11 @@
 block discarded – undo
66 66
 			$this->tags["js"] = $this->getJs();
67 67
 			$this->tags["jsVariables"] = $this->getJsVariables();
68 68
 		}
69
+
70
+		/**
71
+		 * @param string $_function
72
+		 * @param string $_extenction
73
+		 */
69 74
 		protected function getRequire( $_function, $_extenction) {
70 75
 			$temp = [];
71 76
 			foreach ($this->required as $i)
Please login to merge, or discard this patch.
Braces   +27 added lines, -18 removed lines patch added patch discarded remove patch
@@ -29,34 +29,40 @@  discard block
 block discarded – undo
29 29
 		}
30 30
 		public function getJsVariables() {
31 31
 			$temp = [];
32
-			foreach ($this->required as $i)
33
-				if (is_array($i))
32
+			foreach ($this->required as $i) {
33
+							if (is_array($i))
34 34
 					array_push($temp,$i);
35
-			foreach ($this->modules as $i)
36
-				$temp = array_merge( $temp, $i->getJsVariables() );
37
-			foreach ($this->files as $i)
38
-				if (is_array($i))
35
+			}
36
+			foreach ($this->modules as $i) {
37
+							$temp = array_merge( $temp, $i->getJsVariables() );
38
+			}
39
+			foreach ($this->files as $i) {
40
+							if (is_array($i))
39 41
 					array_push($temp,$i);
42
+			}
40 43
 			return $temp;
41 44
 		}
42 45
 		public function addModules( $_mods ) {
43
-			foreach ($_mods as $value)
44
-				$this->addModule($value);
46
+			foreach ($_mods as $value) {
47
+							$this->addModule($value);
48
+			}
45 49
 		}
46 50
 		public function addModule( $_mod ) {
47 51
 			$this->modules[$_mod->name] = $_mod;
48 52
 			$this->modules[$_mod->name]->parameters = &$this->parameters;
49 53
 		}
50 54
 		public function addFiles( $_files ) {
51
-			foreach ($_files as $value)
52
-				$this->addFile($value);
55
+			foreach ($_files as $value) {
56
+							$this->addFile($value);
57
+			}
53 58
 		}
54 59
 		public function addFile( $_file ) {
55 60
 			array_push($this->files, $_file);
56 61
 		}
57 62
 		public function addFilesRequired( $_files ) {
58
-			foreach ($_files as $value)
59
-				$this->addFileRequired($value);
63
+			foreach ($_files as $value) {
64
+							$this->addFileRequired($value);
65
+			}
60 66
 		}
61 67
 		public function addFileRequired( $_file ) {
62 68
 			array_push($this->required, $_file);
@@ -68,14 +74,17 @@  discard block
 block discarded – undo
68 74
 		}
69 75
 		protected function getRequire( $_function, $_extenction) {
70 76
 			$temp = [];
71
-			foreach ($this->required as $i)
72
-				if (!is_array($i) && strpos($i, $_extenction) !== FALSE)
77
+			foreach ($this->required as $i) {
78
+							if (!is_array($i) && strpos($i, $_extenction) !== FALSE)
73 79
 					array_push($temp,$i);
74
-			foreach ($this->modules as $i)
75
-				$temp = array_merge( $temp, $i->$_function() );
76
-			foreach ($this->files as $i)
77
-				if (!is_array($i) && strpos($i, $_extenction) !== FALSE)
80
+			}
81
+			foreach ($this->modules as $i) {
82
+							$temp = array_merge( $temp, $i->$_function() );
83
+			}
84
+			foreach ($this->files as $i) {
85
+							if (!is_array($i) && strpos($i, $_extenction) !== FALSE)
78 86
 					array_push($temp,$i);
87
+			}
79 88
 			return $temp;
80 89
 		}
81 90
 	}
Please login to merge, or discard this patch.