Test Failed
Push — master ( c57064...01ffe9 )
by Federico
02:07
created
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.