Test Failed
Push — master ( c57064...01ffe9 )
by Federico
02:07
created
dist/jate/functions/block.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@
 block discarded – undo
51 51
   function minifyOutput($_buffer) {
52 52
     $search = array ( '/\>[^\S ]+/s', '/[^\S ]+\</s', '/(\s)+/s' );
53 53
     $replace = array ( '>', '<', '\\1' );
54
-    if (preg_match("/\<html/i",$_buffer) == 1 && preg_match("/\<\/html\>/i",$_buffer) == 1)
55
-      $_buffer = preg_replace($search, $replace, utf8_decode($_buffer));
54
+    if (preg_match("/\<html/i",$_buffer) == 1 && preg_match("/\<\/html\>/i",$_buffer) == 1) {
55
+          $_buffer = preg_replace($search, $replace, utf8_decode($_buffer));
56
+    }
56 57
     return utf8_encode($_buffer);
57 58
   }
58 59
 ?>
Please login to merge, or discard this patch.
dist/jate/functions/array.php 1 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 1 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/git.php 1 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/status.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,8 +22,9 @@  discard block
 block discarded – undo
22 22
           $percent;
23 23
           foreach (getGitLog() as $i) {
24 24
             $cont++;
25
-            if($cont % $nPerCol == 1)
26
-              echo '<div class="row">';
25
+            if($cont % $nPerCol == 1) {
26
+                          echo '<div class="row">';
27
+            }
27 28
             if(isset($i["tag"])) {
28 29
               $percent = explode(".",$i["tag"]);
29 30
               $percent = 100 * intval($percent[0]) + 10 * intval($percent[1]) + intval($percent[2]);
@@ -32,7 +33,8 @@  discard block
 block discarded – undo
32 33
             <div class="col-lg-<?=$dim?>">
33 34
               <div class="well well-sm miniblock">
34 35
                 <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>
36
+                <div class="tag"><b>Tag:</b> <?php if(isset($i["tag"])) {
37
+	echo $i["tag"]?><br></div>
36 38
                 <div class="date"><b>Date:</b> <?=$i["date"]?><br></div>
37 39
                 <div class="message"><b>Message:</b> <?=$i["message"]?><br></div>
38 40
                 <div class="progress">
@@ -46,6 +48,7 @@  discard block
 block discarded – undo
46 48
           <?php
47 49
           if($cont % $nPerCol == 0)
48 50
             echo '</div>';
51
+}
49 52
           } ?>
50 53
         </div>
51 54
       </div>
Please login to merge, or discard this patch.
dist/jate.php 1 patch
Braces   +10 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-  if(!isset($GLOBALS["JATEPath"]))
3
-    $GLOBALS["JATEPath"] = [];
2
+  if(!isset($GLOBALS["JATEPath"])) {
3
+      $GLOBALS["JATEPath"] = [];
4
+  }
4 5
   $commonLocations = [
5 6
       "bower_components/JATE/dist/"
6 7
     , "vendor/xaberr/jate/dist/"
@@ -9,13 +10,15 @@  discard block
 block discarded – undo
9 10
     , dirname(__FILE__)."/"
10 11
   ];
11 12
   $jSuccess = false;
12
-  foreach ($commonLocations as $path)
13
-    if(file_exists("${path}jate/coreEngine.php")) {
13
+  foreach ($commonLocations as $path) {
14
+      if(file_exists("${path}jate/coreEngine.php")) {
14 15
       array_push($GLOBALS["JATEPath"], $path);
16
+  }
15 17
       require_once("${path}jate/coreEngine.php");
16 18
       $jSuccess = true;
17 19
       break;
18 20
     }
19
-  if( !$jSuccess )
20
-    throw new Exception("JATE can't find coreEngine.php.");
21
-?>
21
+  if( !$jSuccess ) {
22
+      throw new Exception("JATE can't find coreEngine.php.");
23
+  }
24
+  ?>
Please login to merge, or discard this patch.