Completed
Push — master ( 7f2391...b0dbdc )
by Federico
03:14
created
dist/jate/functions/folder.php 1 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.
dist/jate/modules/Query/Query.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,42 +7,42 @@
 block discarded – undo
7 7
 			$this->connection = [];
8 8
 			$this->currentConnection = null;
9 9
 		}
10
-		public function addConnection( $_name, $_connection ) {
10
+		public function addConnection($_name, $_connection) {
11 11
 			$this->connection["$_name"] = $_connection;
12 12
 			$this->currentConnection = $_connection;
13 13
 
14 14
 			foreach ($this->modules as &$module)
15
-				if(isset($module->currentConnection))
15
+				if (isset($module->currentConnection))
16 16
 					$module->addConnection($_name, $_connection);
17 17
 		}
18
-		public function setConnection( $_name ) {
18
+		public function setConnection($_name) {
19 19
 			$this->currentConnection = $this->connection["$_name"];
20 20
 		}
21
-		public function query( $_query ) {
21
+		public function query($_query) {
22 22
 			$this->stdQuery($_query);
23 23
 			return true;
24 24
 		}
25
-		public function queryInsert( $_query ) {
25
+		public function queryInsert($_query) {
26 26
 			$temp = $this->stdQuery($_query);
27 27
 			return $this->currentConnection->database->lastInsertId();
28 28
 		}
29 29
 
30
-		public function queryFetch( $_query ) {
30
+		public function queryFetch($_query) {
31 31
 			$temp = $this->stdQuery($_query);
32 32
 			return $temp->fetchAll(PDO::FETCH_ASSOC);
33 33
 		}
34 34
 
35
-		public function queryArray( $_query ) {
35
+		public function queryArray($_query) {
36 36
 			$temp = $this->stdQuery($_query);
37 37
 			return $temp->fetchAll(PDO::FETCH_COLUMN, 0);
38 38
 		}
39 39
 
40
-		protected function stdQuery( $_query ) {
40
+		protected function stdQuery($_query) {
41 41
 			$database = $this->currentConnection->database;
42 42
 			$error = "Error query [$_query]";
43 43
 			$query = $database->prepare($_query);
44 44
 			$_result = $query->execute();
45
-			if(!$_result) {
45
+			if (!$_result) {
46 46
 				echo "$_query<br>";
47 47
 				echo "Something wrong: $error";
48 48
 				var_dump($query->errorInfo());
Please login to merge, or discard this patch.
dist/jate/functions/git.php 1 patch
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.
dist/jate/modules/GUI/GUI.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,17 +3,17 @@
 block discarded – undo
3 3
 		public function __construct() {
4 4
 			parent::__construct();
5 5
 		}
6
-		public function init( $_page ) {
6
+		public function init($_page) {
7 7
 			$this->tags = $_page->tags;
8 8
 		}
9
-		public function draw( $_template ) {
9
+		public function draw($_template) {
10 10
 			$page = file_get_contents($_template);
11 11
 			$render = $this->overlayTag($page);
12 12
 			echo minifyOutput($render);
13 13
 		}
14
-		protected function overlayTag( $_page ) {
15
-			foreach($this->tags as $key => $value)
16
-				if(!is_array($value))
14
+		protected function overlayTag($_page) {
15
+			foreach ($this->tags as $key => $value)
16
+				if (!is_array($value))
17 17
 					$_page = str_replace("<_${key}_>", "$value", $_page);
18 18
 			return $_page;
19 19
 		}
Please login to merge, or discard this patch.
dist/jate/functions/array.php 1 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.
examples/05database/bundles/controllers/Home.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 	class Home extends Template {
3
-		public function __construct( $_parameters ) {
4
-			parent::__construct( $_parameters );
5
-			$this->tags["title"]		= "JATE - Home";
3
+		public function __construct($_parameters) {
4
+			parent::__construct($_parameters);
5
+			$this->tags["title"] = "JATE - Home";
6 6
 			$this->tags["content"] = $this->makePage();
7 7
 		}
8 8
 		public function makePage() {
Please login to merge, or discard this patch.
examples/05database/bundles/controllers/Page404.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 	class Page404 extends Template {
3
-		public function __construct( $_parameters ) {
4
-			parent::__construct( $_parameters );
5
-			$this->tags["title"]		= "JATE - 404";
3
+		public function __construct($_parameters) {
4
+			parent::__construct($_parameters);
5
+			$this->tags["title"] = "JATE - 404";
6 6
 			$this->tags["content"] = $this->makePage();
7 7
 		}
8 8
 		public function makePage() {
Please login to merge, or discard this patch.
examples/05database/bundles/controllers/Page01.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 	class Page01 extends Template {
3
-		public function __construct( $_parameters ) {
4
-			parent::__construct( $_parameters );
5
-			$this->tags["title"]		= "JATE - Page01";
3
+		public function __construct($_parameters) {
4
+			parent::__construct($_parameters);
5
+			$this->tags["title"] = "JATE - Page01";
6 6
 			$this->tags["content"] = $this->makePage();
7 7
 		}
8 8
 		public function makePage() {
Please login to merge, or discard this patch.
examples/03pageParameters/status.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@  discard block
 block discarded – undo
22 22
 					$percent;
23 23
 					foreach (getGitLog() as $i) {
24 24
 						$cont++;
25
-						if($cont % $nPerCol == 1)
25
+						if ($cont % $nPerCol == 1)
26 26
 							echo '<div class="row">';
27
-						if(isset($i["tag"])) {
28
-							$percent = explode(".",$i["tag"]);
27
+						if (isset($i["tag"])) {
28
+							$percent = explode(".", $i["tag"]);
29 29
 							$percent = 100 * intval($percent[0]) + 10 * intval($percent[1]) + intval($percent[2]);
30 30
 						}
31 31
 					?>
32 32
 						<div class="col-lg-<?=$dim?>">
33 33
 							<div class="well well-sm miniblock">
34 34
 								<div class="autor"><b>Autor:</b> <?=$i["author"]?><br></div>
35
-								<div class="tag"><b>Tag:</b> <?php if(isset($i["tag"])) echo $i["tag"]?><br></div>
35
+								<div class="tag"><b>Tag:</b> <?php if (isset($i["tag"])) echo $i["tag"]?><br></div>
36 36
 								<div class="date"><b>Date:</b> <?=$i["date"]?><br></div>
37 37
 								<div class="message"><b>Message:</b> <?=$i["message"]?><br></div>
38 38
 								<div class="progress">
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 							</div>
45 45
 						</div>
46 46
 					<?php
47
-					if($cont % $nPerCol == 0)
47
+					if ($cont % $nPerCol == 0)
48 48
 						echo '</div>';
49 49
 					} ?>
50 50
 				</div>
Please login to merge, or discard this patch.