Test Failed
Push — master ( a33193...53306a )
by Federico
02:00
created
dist/jate/functions/array.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,45 +1,45 @@
 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 14
   function travelStringArray ( $_array, $_function ) {
15
-    if (is_array($_array)) {
16
-      foreach ($_array as $k => $v) {
17
-        $_array[$k] = travelStringArray($v, $_function);
18
-      }
19
-    } else if (is_string ($_array)) {
20
-      return call_user_func($_function,$_array);
21
-    }
22
-    return $_array;
15
+	if (is_array($_array)) {
16
+	  foreach ($_array as $k => $v) {
17
+		$_array[$k] = travelStringArray($v, $_function);
18
+	  }
19
+	} else if (is_string ($_array)) {
20
+	  return call_user_func($_function,$_array);
21
+	}
22
+	return $_array;
23 23
   }
24 24
   function arrayDepth( $_array ) {
25
-    $maxDepth = 1;
26
-    foreach ($_array as $value) {
27
-      if (is_array($value)) {
28
-        $depth = arrayDepth($value) + 1;
29
-        if ($depth > $maxDepth) {
30
-          $maxDepth = $depth;
31
-        }
32
-      }
33
-    }
34
-    return $maxDepth;
25
+	$maxDepth = 1;
26
+	foreach ($_array as $value) {
27
+	  if (is_array($value)) {
28
+		$depth = arrayDepth($value) + 1;
29
+		if ($depth > $maxDepth) {
30
+		  $maxDepth = $depth;
31
+		}
32
+	  }
33
+	}
34
+	return $maxDepth;
35 35
   }
36 36
   function arrayDump( $_array, $_name = "Array", $_tab = "&nbsp;&nbsp;" ) {
37
-      $position = preg_replace('/&nbsp;&nbsp;/', '', $_tab, 1);
38
-      echo "$position<span style=\"color:rgb(230,0,0)\">$_name:</span><br>";
39
-      foreach ($_array as $k => $i)
40
-        if(is_array($i))
41
-          arrayDump( $i, $k, "&nbsp;&nbsp;$_tab" );
42
-        else
43
-          echo "$_tab<b>$k:</b> $i<br>";
44
-    }
37
+	  $position = preg_replace('/&nbsp;&nbsp;/', '', $_tab, 1);
38
+	  echo "$position<span style=\"color:rgb(230,0,0)\">$_name:</span><br>";
39
+	  foreach ($_array as $k => $i)
40
+		if(is_array($i))
41
+		  arrayDump( $i, $k, "&nbsp;&nbsp;$_tab" );
42
+		else
43
+		  echo "$_tab<b>$k:</b> $i<br>";
44
+	}
45 45
 ?>
Please login to merge, or discard this patch.
dist/jate/functions/folder.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -1,45 +1,45 @@
 block discarded – undo
1 1
 <?php
2 2
   function subFolder( $_dir = "./" ) {
3
-    $temp = fetchInSubFolder($_dir, function() {
4
-      return true;
5
-    });
6
-    return $temp;
3
+	$temp = fetchInSubFolder($_dir, function() {
4
+	  return true;
5
+	});
6
+	return $temp;
7 7
   }
8 8
   function subFolderFile( $_dir = "./" ) {
9
-    $temp = fetchInSubFolder($_dir, function( $_file ) {
10
-      return !is_dir($_file);
11
-    });
12
-    return $temp;
9
+	$temp = fetchInSubFolder($_dir, function( $_file ) {
10
+	  return !is_dir($_file);
11
+	});
12
+	return $temp;
13 13
   }
14 14
   function subFolderDir( $_dir = "./" ) {
15
-    $temp = fetchInSubFolder($_dir, function( $_file ) {
16
-      return !is_file($_file);
17
-    });
18
-    return $temp;
15
+	$temp = fetchInSubFolder($_dir, function( $_file ) {
16
+	  return !is_file($_file);
17
+	});
18
+	return $temp;
19 19
   }
20 20
   function fetchInSubFolder( $_dir = "./", $_function) {
21
-    $temp = [];
22
-    if (is_dir($_dir)) {
23
-        if ($dirOpened = opendir($_dir)) {
24
-            while (($file = readdir($dirOpened)) !== false)
25
-                if( ($file !='.')&&($file !='..') )
26
-                  if($_function($file))
27
-                    array_push($temp,$file);
28
-            closedir($dirOpened);
29
-        }
30
-    }
31
-    return $temp;
21
+	$temp = [];
22
+	if (is_dir($_dir)) {
23
+		if ($dirOpened = opendir($_dir)) {
24
+			while (($file = readdir($dirOpened)) !== false)
25
+				if( ($file !='.')&&($file !='..') )
26
+				  if($_function($file))
27
+					array_push($temp,$file);
28
+			closedir($dirOpened);
29
+		}
30
+	}
31
+	return $temp;
32 32
   }
33 33
   function requireSubfolder( $_dir = "./" ) {
34
-    $temp = subFolderFile($_dir);
35
-    foreach ($temp as $i)
36
-      jRequire($_dir."/".$i);
34
+	$temp = subFolderFile($_dir);
35
+	foreach ($temp as $i)
36
+	  jRequire($_dir."/".$i);
37 37
   }
38 38
   function require_js( $_dir = "./" ) {
39
-    $tempArray = [];
40
-    $temp = subFolderFile($_dir);
41
-    foreach ($temp as $i)
42
-      array_push($tempArray, $_dir."/".$i);
43
-    return $tempArray;
39
+	$tempArray = [];
40
+	$temp = subFolderFile($_dir);
41
+	foreach ($temp as $i)
42
+	  array_push($tempArray, $_dir."/".$i);
43
+	return $tempArray;
44 44
   }
45 45
 ?>
Please login to merge, or discard this patch.
dist/jate/functions/string.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
   function htmlParser( $_str) {
3
-    return htmlentities($_str, ENT_QUOTES | ENT_IGNORE, "UTF-8");
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/git.php 1 patch
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -1,56 +1,56 @@
 block discarded – undo
1 1
 <?php
2 2
   function getGitLog( $_dir = "./" ) {
3
-    if(!file_exists($_dir))
4
-      return [];
5
-    $currentDir = getcwd();
6
-    chdir($_dir);
7
-    $gitHistory  = [];
8
-    $gitLogs    = [];
9
-    $gitPath    = str_replace('\\', '/', exec("git rev-parse --show-toplevel"));
10
-    $rootPath    = str_replace('\\', '/', getcwd ());
11
-    $lastHash    = null;
12
-    if( $gitPath != $rootPath ) {
13
-      chdir($currentDir);
14
-      return [];
15
-    }
16
-    exec("git log --decorate=full --tags", $gitLogs);
17
-    foreach ($gitLogs as $line) {
18
-      $line = trim($line);
19
-      if (!empty($line)) {
20
-        if (strpos($line, 'commit') === 0) {
21
-          $hash = explode(' ', $line);
22
-          $hash = trim(end($hash));
23
-          $gitHistory[$hash] = [
24
-            'tag'      => '-1.0.0',
25
-            'author'  => '',
26
-            'date'    => '',
27
-            'message'  => ''
28
-          ];
29
-          $lastHash = $hash;
30
-          if (strpos($line, 'tag') !== false) {
31
-            $tag = explode(':', $line);
32
-            $tag = explode('/', $tag[1]);
33
-            $tag = explode(',', $tag[2]);
34
-            $tag = explode(')', $tag[0]);
35
-            $tag = trim($tag[0]);
36
-            $gitHistory[$lastHash]['tag'] = $tag;
37
-          }
38
-        }
39
-        else if (strpos($line, 'Author') === 0) {
40
-          $author = explode(':', $line);
41
-          $author = trim(end($author));
42
-          $gitHistory[$lastHash]['author'] = $author;
43
-        }
44
-        else if (strpos($line, 'Date') === 0) {
45
-          $date = explode(':', $line, 2);
46
-          $date = trim(end($date));
47
-          $gitHistory[$lastHash]['date'] = date('d/m/Y H:i:s A', strtotime($date));
48
-        }
49
-        else
50
-          $gitHistory[$lastHash]['message'] .= "$line<br>";
51
-      }
52
-    }
53
-    chdir($currentDir);
54
-    return $gitHistory;
3
+	if(!file_exists($_dir))
4
+	  return [];
5
+	$currentDir = getcwd();
6
+	chdir($_dir);
7
+	$gitHistory  = [];
8
+	$gitLogs    = [];
9
+	$gitPath    = str_replace('\\', '/', exec("git rev-parse --show-toplevel"));
10
+	$rootPath    = str_replace('\\', '/', getcwd ());
11
+	$lastHash    = null;
12
+	if( $gitPath != $rootPath ) {
13
+	  chdir($currentDir);
14
+	  return [];
15
+	}
16
+	exec("git log --decorate=full --tags", $gitLogs);
17
+	foreach ($gitLogs as $line) {
18
+	  $line = trim($line);
19
+	  if (!empty($line)) {
20
+		if (strpos($line, 'commit') === 0) {
21
+		  $hash = explode(' ', $line);
22
+		  $hash = trim(end($hash));
23
+		  $gitHistory[$hash] = [
24
+			'tag'      => '-1.0.0',
25
+			'author'  => '',
26
+			'date'    => '',
27
+			'message'  => ''
28
+		  ];
29
+		  $lastHash = $hash;
30
+		  if (strpos($line, 'tag') !== false) {
31
+			$tag = explode(':', $line);
32
+			$tag = explode('/', $tag[1]);
33
+			$tag = explode(',', $tag[2]);
34
+			$tag = explode(')', $tag[0]);
35
+			$tag = trim($tag[0]);
36
+			$gitHistory[$lastHash]['tag'] = $tag;
37
+		  }
38
+		}
39
+		else if (strpos($line, 'Author') === 0) {
40
+		  $author = explode(':', $line);
41
+		  $author = trim(end($author));
42
+		  $gitHistory[$lastHash]['author'] = $author;
43
+		}
44
+		else if (strpos($line, 'Date') === 0) {
45
+		  $date = explode(':', $line, 2);
46
+		  $date = trim(end($date));
47
+		  $gitHistory[$lastHash]['date'] = date('d/m/Y H:i:s A', strtotime($date));
48
+		}
49
+		else
50
+		  $gitHistory[$lastHash]['message'] .= "$line<br>";
51
+	  }
52
+	}
53
+	chdir($currentDir);
54
+	return $gitHistory;
55 55
   }
56 56
 ?>
Please login to merge, or discard this patch.
dist/status.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -15,20 +15,20 @@  discard block
 block discarded – undo
15 15
       <div class="row" style="margin-top:20px;">
16 16
         <div class="col-lg-12">
17 17
           <?php
18
-          $nPerCol = 6;
19
-          $max = 12;
20
-          $dim = $max / $nPerCol;
21
-          $cont = 0;
22
-          $percent;
23
-          foreach (getGitLog() as $i) {
24
-            $cont++;
25
-            if($cont % $nPerCol == 1)
26
-              echo '<div class="row">';
27
-            if(isset($i["tag"])) {
28
-              $percent = explode(".",$i["tag"]);
29
-              $percent = 100 * intval($percent[0]) + 10 * intval($percent[1]) + intval($percent[2]);
30
-            }
31
-          ?>
18
+		  $nPerCol = 6;
19
+		  $max = 12;
20
+		  $dim = $max / $nPerCol;
21
+		  $cont = 0;
22
+		  $percent;
23
+		  foreach (getGitLog() as $i) {
24
+			$cont++;
25
+			if($cont % $nPerCol == 1)
26
+			  echo '<div class="row">';
27
+			if(isset($i["tag"])) {
28
+			  $percent = explode(".",$i["tag"]);
29
+			  $percent = 100 * intval($percent[0]) + 10 * intval($percent[1]) + intval($percent[2]);
30
+			}
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>
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
               </div>
45 45
             </div>
46 46
           <?php
47
-          if($cont % $nPerCol == 0)
48
-            echo '</div>';
49
-          } ?>
47
+		  if($cont % $nPerCol == 0)
48
+			echo '</div>';
49
+		  } ?>
50 50
         </div>
51 51
       </div>
52 52
     </div>
Please login to merge, or discard this patch.
dist/jate.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
   if(!isset($GLOBALS["JATEPath"]))
3
-    $GLOBALS["JATEPath"] = [];
3
+	$GLOBALS["JATEPath"] = [];
4 4
   $commonLocations = [
5
-      "bower_components/JATE/dist/"
6
-    , "vendor/xaberr/jate/dist/"
7
-    , "../../dist/"
8
-    , "../dist/"
9
-    , dirname(__FILE__)."/"
5
+	  "bower_components/JATE/dist/"
6
+	, "vendor/xaberr/jate/dist/"
7
+	, "../../dist/"
8
+	, "../dist/"
9
+	, dirname(__FILE__)."/"
10 10
   ];
11 11
   $jSuccess = false;
12 12
   foreach ($commonLocations as $path)
13
-    if(file_exists("${path}jate/coreEngine.php")) {
14
-      array_push($GLOBALS["JATEPath"], $path);
15
-      require_once("${path}jate/coreEngine.php");
16
-      $jSuccess = true;
17
-      break;
18
-    }
13
+	if(file_exists("${path}jate/coreEngine.php")) {
14
+	  array_push($GLOBALS["JATEPath"], $path);
15
+	  require_once("${path}jate/coreEngine.php");
16
+	  $jSuccess = true;
17
+	  break;
18
+	}
19 19
   if( !$jSuccess )
20
-    throw new Exception("JATE can't find coreEngine.php.");
20
+	throw new Exception("JATE can't find coreEngine.php.");
21 21
 ?>
Please login to merge, or discard this patch.
tests/jate/modules/Module/ModuleTest.php 1 patch
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -2,60 +2,60 @@
 block discarded – undo
2 2
   declare( strict_types = 1 );
3 3
   // backward compatibility
4 4
   if (!class_exists('\PHPUnit\Framework\TestCase')) {
5
-    class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
5
+	class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
6 6
   }
7 7
   use PHPUnit\Framework\TestCase;
8 8
 
9 9
   final class ModuleTest extends TestCase {
10
-    public function testAddFile() {
11
-      $this->expectException(InvalidArgumentException::class);
12
-      $module = new Module();
13
-      $module->addFile(123);
14
-    }
15
-    public function testAddFileRequired() {
16
-      $this->expectException(InvalidArgumentException::class);
17
-      $module = new Module();
18
-      $module->addFileRequired(123);
19
-    }
20
-    public function testAddFiles() {
21
-      $this->expectException(InvalidArgumentException::class);
22
-      $module = new Module();
23
-      $module->addFiles("/file.php");
24
-    }
25
-    public function testAddFilesRequired() {
26
-      $this->expectException(InvalidArgumentException::class);
27
-      $module = new Module();
28
-      $module->addFilesRequired("/file.php");
29
-    }
30
-    public function testAddModuleClass() {
31
-      $this->expectException(InvalidArgumentException::class);
32
-      $module = new Module();
33
-      $module->addModule(123);
34
-    }
35
-    public function testAddModuleNoModule() {
36
-      $this->expectException(InvalidArgumentException::class);
37
-      $module = new Module();
38
-      $module->addModule((object)[1,2,3]);
39
-    }
40
-    public function testAddModules() {
41
-      $this->expectException(InvalidArgumentException::class);
42
-      $module = new Module();
43
-      $module->addModules("Module");
44
-    }
45
-    public function testGetCss() {
46
-      $module = new Module();
47
-      $module->addFiles(["1.css","2.js","3.css","4.js"]);
48
-      $this->assertEquals(["1.css","3.css"], $module->getCss());
49
-    }
50
-    public function testGetJs() {
51
-      $module = new Module();
52
-      $module->addFiles(["1.css","2.js","3.css","4.js"]);
53
-      $this->assertEquals(["2.js","4.js"], $module->getJs());
54
-    }
55
-    public function testGetJsVariables() {
56
-      $module = new Module();
57
-      $module->addFiles(["1.css",["variable","2"],"3.css","4.js"]);
58
-      $this->assertEquals([["variable","2"]], $module->getJsVariables());
59
-    }
10
+	public function testAddFile() {
11
+	  $this->expectException(InvalidArgumentException::class);
12
+	  $module = new Module();
13
+	  $module->addFile(123);
14
+	}
15
+	public function testAddFileRequired() {
16
+	  $this->expectException(InvalidArgumentException::class);
17
+	  $module = new Module();
18
+	  $module->addFileRequired(123);
19
+	}
20
+	public function testAddFiles() {
21
+	  $this->expectException(InvalidArgumentException::class);
22
+	  $module = new Module();
23
+	  $module->addFiles("/file.php");
24
+	}
25
+	public function testAddFilesRequired() {
26
+	  $this->expectException(InvalidArgumentException::class);
27
+	  $module = new Module();
28
+	  $module->addFilesRequired("/file.php");
29
+	}
30
+	public function testAddModuleClass() {
31
+	  $this->expectException(InvalidArgumentException::class);
32
+	  $module = new Module();
33
+	  $module->addModule(123);
34
+	}
35
+	public function testAddModuleNoModule() {
36
+	  $this->expectException(InvalidArgumentException::class);
37
+	  $module = new Module();
38
+	  $module->addModule((object)[1,2,3]);
39
+	}
40
+	public function testAddModules() {
41
+	  $this->expectException(InvalidArgumentException::class);
42
+	  $module = new Module();
43
+	  $module->addModules("Module");
44
+	}
45
+	public function testGetCss() {
46
+	  $module = new Module();
47
+	  $module->addFiles(["1.css","2.js","3.css","4.js"]);
48
+	  $this->assertEquals(["1.css","3.css"], $module->getCss());
49
+	}
50
+	public function testGetJs() {
51
+	  $module = new Module();
52
+	  $module->addFiles(["1.css","2.js","3.css","4.js"]);
53
+	  $this->assertEquals(["2.js","4.js"], $module->getJs());
54
+	}
55
+	public function testGetJsVariables() {
56
+	  $module = new Module();
57
+	  $module->addFiles(["1.css",["variable","2"],"3.css","4.js"]);
58
+	  $this->assertEquals([["variable","2"]], $module->getJsVariables());
59
+	}
60 60
   }
61 61
 ?>
Please login to merge, or discard this patch.
dist/jate/modules/Connection/Connection.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -2,51 +2,51 @@
 block discarded – undo
2 2
   jRequire("../Module/Module.php");
3 3
   requireComponents("Adapters");
4 4
   class Connection extends Module {
5
-    public $database;
6
-    public $info;
7
-    public function __construct() {
8
-      parent::__construct();
9
-      $args = func_get_args();
10
-      $count = func_num_args();
11
-      if (method_exists($this,$func='__construct'.$count))
12
-        call_user_func_array(array($this,$func),$args);
13
-    }
14
-    public function __construct0() {
15
-      $this->database = null;
16
-    }
17
-    public function __construct4 ( $_srv, $_db, $_usr, $_pass ) {
18
-      $this->setConnection($_srv, $_db, $_usr, $_pass, "pdo");
19
-    }
20
-    public function __construct5 ( $_srv, $_db, $_usr, $_pass, $_type ) {
21
-      $type = $this->getConnectionType($_type);
22
-      $this->setConnection($_srv, $_db, $_usr, $_pass, $type);
23
-    }
24
-    protected function setConnection ( $_srv, $_db, $_usr, $_pass, $_type ) {
25
-      switch ($_type) {
26
-        case "mysqli":
27
-          $this->database = new ConnectionMysqliAdapter($_srv, $_db, $_usr, $_pass);
28
-        break;
29
-        case "postgresql":
30
-          $this->database = new ConnectionPostgresqlAdapter($_srv, $_db, $_usr, $_pass);
31
-        break;
32
-        default:
33
-          $this->database = new ConnectionPdoAdapter($_srv, $_db, $_usr, $_pass);
34
-        break;
35
-      }
36
-      $this->setConnectionParameters( $_srv, $_db, $_usr, $_pass);
37
-    }
38
-    protected function getConnectionType( $_type ) {
39
-      foreach ($_type as $key => $value)
40
-        if($value)
41
-          return $key;
42
-      return "pdo";
43
-    }
44
-    protected function setConnectionParameters( $_srv, $_db, $_usr, $_pass) {
45
-      $this->info = [];
46
-      $this->info["server"]    = $_srv;
47
-      $this->info["database"]  = $_db;
48
-      $this->info["user"]      = $_usr;
49
-      $this->info["password"]  = $_pass;
50
-    }
5
+	public $database;
6
+	public $info;
7
+	public function __construct() {
8
+	  parent::__construct();
9
+	  $args = func_get_args();
10
+	  $count = func_num_args();
11
+	  if (method_exists($this,$func='__construct'.$count))
12
+		call_user_func_array(array($this,$func),$args);
13
+	}
14
+	public function __construct0() {
15
+	  $this->database = null;
16
+	}
17
+	public function __construct4 ( $_srv, $_db, $_usr, $_pass ) {
18
+	  $this->setConnection($_srv, $_db, $_usr, $_pass, "pdo");
19
+	}
20
+	public function __construct5 ( $_srv, $_db, $_usr, $_pass, $_type ) {
21
+	  $type = $this->getConnectionType($_type);
22
+	  $this->setConnection($_srv, $_db, $_usr, $_pass, $type);
23
+	}
24
+	protected function setConnection ( $_srv, $_db, $_usr, $_pass, $_type ) {
25
+	  switch ($_type) {
26
+		case "mysqli":
27
+		  $this->database = new ConnectionMysqliAdapter($_srv, $_db, $_usr, $_pass);
28
+		break;
29
+		case "postgresql":
30
+		  $this->database = new ConnectionPostgresqlAdapter($_srv, $_db, $_usr, $_pass);
31
+		break;
32
+		default:
33
+		  $this->database = new ConnectionPdoAdapter($_srv, $_db, $_usr, $_pass);
34
+		break;
35
+	  }
36
+	  $this->setConnectionParameters( $_srv, $_db, $_usr, $_pass);
37
+	}
38
+	protected function getConnectionType( $_type ) {
39
+	  foreach ($_type as $key => $value)
40
+		if($value)
41
+		  return $key;
42
+	  return "pdo";
43
+	}
44
+	protected function setConnectionParameters( $_srv, $_db, $_usr, $_pass) {
45
+	  $this->info = [];
46
+	  $this->info["server"]    = $_srv;
47
+	  $this->info["database"]  = $_db;
48
+	  $this->info["user"]      = $_usr;
49
+	  $this->info["password"]  = $_pass;
50
+	}
51 51
   }
52 52
 ?>
Please login to merge, or discard this patch.
dist/jate/modules/Query/Query.php 1 patch
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -1,48 +1,48 @@
 block discarded – undo
1 1
 <?php
2 2
   jRequire("../Module/Module.php");
3 3
   class Query extends Module {
4
-    public $connection;
5
-    public $currentConnection;
6
-    public function __construct() {
7
-      parent::__construct();
8
-      $this->connection = [];
9
-      $this->currentConnection = null;
10
-    }
11
-    public function addConnection( $_name, $_connection ) {
12
-      Debug::push();
13
-      $this->connection["$_name"] = $_connection;
14
-      $this->currentConnection = $_connection;
15
-      foreach ($this->modules as &$module)
16
-        if(isset($module->currentConnection))
17
-          $module->addConnection($_name, $_connection);
18
-      Debug::pop();
19
-    }
20
-    public function setConnection( $_name ) {
21
-      $this->currentConnection = $this->connection["$_name"];
22
-    }
23
-    public function query( $_query ) {
24
-      Debug::push();
25
-      $temp = $this->currentConnection->database->query($_query);
26
-      Debug::pop();
27
-      return $temp;
28
-    }
29
-    public function queryInsert( $_query ) {
30
-      Debug::push();
31
-      $temp = $this->currentConnection->database->queryInsert($_query);
32
-      Debug::pop();
33
-      return $temp;
34
-    }
35
-    public function queryFetch( $_query ) {
36
-      Debug::push();
37
-      $temp = $this->currentConnection->database->queryFetch($_query);
38
-      Debug::pop();
39
-      return $temp;
40
-    }
41
-    public function queryArray( $_query ) {
42
-      Debug::push();
43
-      $temp = $this->currentConnection->database->queryArray($_query);
44
-      Debug::pop();
45
-      return $temp;
46
-    }
4
+	public $connection;
5
+	public $currentConnection;
6
+	public function __construct() {
7
+	  parent::__construct();
8
+	  $this->connection = [];
9
+	  $this->currentConnection = null;
10
+	}
11
+	public function addConnection( $_name, $_connection ) {
12
+	  Debug::push();
13
+	  $this->connection["$_name"] = $_connection;
14
+	  $this->currentConnection = $_connection;
15
+	  foreach ($this->modules as &$module)
16
+		if(isset($module->currentConnection))
17
+		  $module->addConnection($_name, $_connection);
18
+	  Debug::pop();
19
+	}
20
+	public function setConnection( $_name ) {
21
+	  $this->currentConnection = $this->connection["$_name"];
22
+	}
23
+	public function query( $_query ) {
24
+	  Debug::push();
25
+	  $temp = $this->currentConnection->database->query($_query);
26
+	  Debug::pop();
27
+	  return $temp;
28
+	}
29
+	public function queryInsert( $_query ) {
30
+	  Debug::push();
31
+	  $temp = $this->currentConnection->database->queryInsert($_query);
32
+	  Debug::pop();
33
+	  return $temp;
34
+	}
35
+	public function queryFetch( $_query ) {
36
+	  Debug::push();
37
+	  $temp = $this->currentConnection->database->queryFetch($_query);
38
+	  Debug::pop();
39
+	  return $temp;
40
+	}
41
+	public function queryArray( $_query ) {
42
+	  Debug::push();
43
+	  $temp = $this->currentConnection->database->queryArray($_query);
44
+	  Debug::pop();
45
+	  return $temp;
46
+	}
47 47
   }
48 48
 ?>
Please login to merge, or discard this patch.