Passed
Push — master ( 25c5f3...d91862 )
by Saepul
07:05 queued 02:03
created
config/qrcode/qrtools.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         {
30 30
             $len = count($frame);
31 31
             foreach ($frame as &$frameLine) {
32
-                for ($i = 0; $i < $len; $i++) {
32
+                for ($i = 0; $i<$len; $i++) {
33 33
                     $frameLine[$i] = (ord($frameLine[$i]) & 1) ? '1' : '0';
34 34
                 }
35 35
             }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
             $eccLevel = 'L';
50 50
 
51
-            if (count($mode) > 1) {
51
+            if (count($mode)>1) {
52 52
                 $eccLevel = $mode[1];
53 53
             }
54 54
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             foreach ($qrTab as $line) {
63 63
                 $arrAdd = [];
64 64
                 foreach (str_split($line) as $char) {
65
-                    $arrAdd[] = ($char == '1') ? 1 : 0;
65
+                    $arrAdd[] = ($char=='1') ? 1 : 0;
66 66
                 }
67 67
                 $barcode_array['bcode'][] = $arrAdd;
68 68
             }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             self::markTime('before_build_cache');
83 83
 
84 84
             $mask = new QRmask();
85
-            for ($a = 1; $a <= QRSPEC_VERSION_MAX; $a++) {
85
+            for ($a = 1; $a<=QRSPEC_VERSION_MAX; $a++) {
86 86
                 $frame = QRspec::newFrame($a);
87 87
                 if (QR_IMAGE) {
88 88
                     $fileName = QR_CACHE_DIR.'frame_'.$a.'.png';
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
                 $width = count($frame);
93 93
                 $bitMask = array_fill(0, $width, array_fill(0, $width, 0));
94
-                for ($maskNo = 0; $maskNo < 8; $maskNo++) {
94
+                for ($maskNo = 0; $maskNo<8; $maskNo++) {
95 95
                     $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true);
96 96
                 }
97 97
             }
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
         //----------------------------------------------------------------------
103 103
         public static function log($outfile, $err)
104 104
         {
105
-            if (QR_LOG_DIR !== false) {
106
-                if ($err != '') {
107
-                    if ($outfile !== false) {
105
+            if (QR_LOG_DIR!==false) {
106
+                if ($err!='') {
107
+                    if ($outfile!==false) {
108 108
                         file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND);
109 109
                     } else {
110 110
                         file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND);
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
         public static function dumpMask($frame)
118 118
         {
119 119
             $width = count($frame);
120
-            for ($y = 0; $y < $width; $y++) {
121
-                for ($x = 0; $x < $width; $x++) {
120
+            for ($y = 0; $y<$width; $y++) {
121
+                for ($x = 0; $x<$width; $x++) {
122 122
                     echo ord($frame[$y][$x]).',';
123 123
                 }
124 124
             }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         public static function markTime($markerId)
129 129
         {
130 130
             list($usec, $sec) = explode(' ', microtime());
131
-            $time = ((float) $usec + (float) $sec);
131
+            $time = ((float)$usec + (float)$sec);
132 132
 
133 133
             if (!isset($GLOBALS['qr_time_bench'])) {
134 134
                 $GLOBALS['qr_time_bench'] = [];
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                     <tbody>';
152 152
 
153 153
             foreach ($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) {
154
-                if ($p > 0) {
154
+                if ($p>0) {
155 155
                     echo '<tr><th style="text-align:right">till '.$markerId.': </th><td>'.number_format($thisTime - $lastTime, 6).'s</td></tr>';
156 156
                 } else {
157 157
                     $startTime = $thisTime;
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
                 return true;
178 178
             } catch (Exception $e) {
179
-                echo 'Exception reçue : ',  $e->getMessage(), "\n";
179
+                echo 'Exception reçue : ', $e->getMessage(), "\n";
180 180
             }
181 181
         }
182 182
     }
Please login to merge, or discard this patch.
config/barcode_gen.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 </style>
18 18
 
19 19
 <?php
20
-global $char128asc,$char128charWidth;
20
+global $char128asc, $char128charWidth;
21 21
 $char128asc = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~';
22 22
 $char128wid = [
23 23
     '212222', '222122', '222221', '121223', '121322', '131222', '122213', '122312', '132212', '221213', // 0-9
@@ -30,24 +30,24 @@  discard block
 block discarded – undo
30 30
     '112412', '122114', '122411', '142112', '142211', '241211', '221114', '413111', '241112', '134111', // 70-79
31 31
     '111242', '121142', '121241', '114212', '124112', '124211', '411212', '421112', '421211', '212141', // 80-89
32 32
     '214121', '412121', '111143', '111341', '131141', '114113', '114311', '411113', '411311', '113141', // 90-99
33
-    '114131', '311141', '411131', '211412', '211214', '211232', '23311120',   ];					   // 100-106
33
+    '114131', '311141', '411131', '211412', '211214', '211232', '23311120', ]; // 100-106
34 34
 
35 35
 ////Define Function
36 36
 function bar128($text)
37 37
 {						// Part 1, make list of widths
38
-  global $char128asc,$char128wid;
39
-    $w = $char128wid[$sum = 104];							// START symbol
38
+  global $char128asc, $char128wid;
39
+    $w = $char128wid[$sum = 104]; // START symbol
40 40
     $onChar = 1;
41
-    for ($x = 0; $x < strlen($text); $x++) {								// GO THRU TEXT GET LETTERS
42
-    if (!(($pos = strpos($char128asc, $text[$x])) === false)) {	// SKIP NOT FOUND CHARS
41
+    for ($x = 0; $x<strlen($text); $x++) {								// GO THRU TEXT GET LETTERS
42
+    if (!(($pos = strpos($char128asc, $text[$x]))===false)) {	// SKIP NOT FOUND CHARS
43 43
       $w .= $char128wid[$pos];
44 44
         $sum += $onChar++ * $pos;
45 45
     }
46 46
     }
47
-    $w .= $char128wid[$sum % 103].$char128wid[106];  		//Check Code, then END
47
+    $w .= $char128wid[$sum % 103].$char128wid[106]; //Check Code, then END
48 48
     //Part 2, Write rows
49 49
     $html = '<table cellpadding=0 cellspacing=0><tr>';
50
-    for ($x = 0; $x < strlen($w); $x += 2) {   						// code 128 widths: black border, then white space
50
+    for ($x = 0; $x<strlen($w); $x += 2) {   						// code 128 widths: black border, then white space
51 51
         $html .= "<td><div class=\"b128\" style=\"border-left-width:{$w[$x]};width:{$w[$x + 1]}\"></div>";
52 52
     }
53 53
 
Please login to merge, or discard this patch.
modal.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
                                          <select name="itipe_barang" class="form-control" onChange="document.myform.submit();">
111 111
                                             <?php
112 112
                                               $query = mysql_query('SELECT * FROM tipe_barang ORDER BY id_tipe_barang');
113
-                                               if ($query && mysql_num_rows($query) > 0) {
113
+                                               if ($query && mysql_num_rows($query)>0) {
114 114
                                                    while ($row = mysql_fetch_object($query)) {
115 115
                                                        echo '<option value="'.$row->id_tipe_barang.'"';
116
-                                                       if ($row->id_tipe_barang == $tipe_barang) {
116
+                                                       if ($row->id_tipe_barang==$tipe_barang) {
117 117
                                                            echo ' selected';
118 118
                                                        }
119 119
                                                        echo '>'.$row->tipe_barang.'</option>';
@@ -127,10 +127,10 @@  discard block
 block discarded – undo
127 127
                                          <select name="ioutlet" class="form-control" onChange="document.myform.submit();">
128 128
                                             <?php
129 129
                                               $query = mysql_query('SELECT * FROM outlet ORDER BY id_outlet');
130
-                                               if ($query && mysql_num_rows($query) > 0) {
130
+                                               if ($query && mysql_num_rows($query)>0) {
131 131
                                                    while ($row = mysql_fetch_object($query)) {
132 132
                                                        echo '<option value="'.$row->id_outlet.'"';
133
-                                                       if ($row->id_outlet == $outlet) {
133
+                                                       if ($row->id_outlet==$outlet) {
134 134
                                                            echo ' selected';
135 135
                                                        }
136 136
                                                        echo '>'.$row->outlet.'</option>';
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 
235 235
                                  $sisa_stok = $r['stok'] - $reserve;
236 236
 
237
-                                 if ($sisa_stok == '0') {
237
+                                 if ($sisa_stok=='0') {
238 238
                                      echo '';
239 239
                                  } else {
240 240
                                      echo'<tr>';
Please login to merge, or discard this patch.
modul/mod_report_revenue/eprint_report_revenue.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 header('Content-Type: application/download');
119 119
 header('Content-Type: application/vnd.ms-excel');
120 120
 
121
-if ($tipe == 'R') {
121
+if ($tipe=='R') {
122 122
     header("Content-Disposition: attachment;filename=rekap_revenue_$nprd.xls ");
123 123
 } else {
124 124
     header("Content-Disposition: attachment;filename=detail_rekap_$nprd.xls ");
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
       ?>
189 189
 
190
-      <?php if ($tipe == 'R') {
190
+      <?php if ($tipe=='R') {
191 191
           ?>
192 192
 
193 193
 
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 
345 345
 
346 346
                    <?php 
347
-                    for ($j = 1; $j <= $hjml; $j++) {
347
+                    for ($j = 1; $j<=$hjml; $j++) {
348 348
                         echo '<th>KUNJ</th>';
349 349
                         echo '<th>REV</th>';
350 350
                     } ?> 
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
 
534 534
           $month = date('m', strtotime($iprd)) * 1;
535 535
 
536
-          if ($month == '1') {
536
+          if ($month=='1') {
537 537
               $imonth = 12;
538 538
           } else {
539 539
               $imonth = $month - 1;
Please login to merge, or discard this patch.
modul/mod_report_revenue/print_report_revenue.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
 $jenis_transaksi = $_GET['jenis_transaksi'];
122 122
 
123
-if ($tipe == 'R') {
123
+if ($tipe=='R') {
124 124
     $kertas = 'portrait';
125 125
 } else {
126 126
     $kertas = 'landscape';
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 
287 287
       ?>
288 288
 
289
-      <?php if ($tipe == 'R') {
289
+      <?php if ($tipe=='R') {
290 290
           ?>
291 291
 
292 292
 
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 
426 426
 
427 427
                    <?php 
428
-                       for ($j = 1; $j <= $hjml; $j++) {
428
+                       for ($j = 1; $j<=$hjml; $j++) {
429 429
                            echo '<th>KUNJ</th>';
430 430
                            echo '<th>REV</th>';
431 431
                        } ?>	
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
 
615 615
           $month = date('m', strtotime($iprd)) * 1;
616 616
 
617
-          if ($month == '1') {
617
+          if ($month=='1') {
618 618
               $imonth = 12;
619 619
           } else {
620 620
               $imonth = $month - 1;
Please login to merge, or discard this patch.
modul/mod_report_pengeluaran_obat/print_report_pengeluaran_obat.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 $id = $r['id_modul'];
13 13
 $fa_icon = $r['fa_icon'];
14 14
 
15
-if ($r[orientation] == 'P') {
15
+if ($r[orientation]=='P') {
16 16
     $orientation = 'portrait';
17 17
 } else {
18 18
     $orientation = 'landscape';
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
 <!--<body onload="cetakspk()">-->
141 141
 
142
-<?php if ($_GET['printto'] == '2') {
142
+<?php if ($_GET['printto']=='2') {
143 143
     ?>
144 144
 <body onload="icetak()">
145 145
 <?php
Please login to merge, or discard this patch.
modul/mod_general_setting/form_general_setting.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 
80 80
     if ($id) {
81 81
         $query = mysql_query('SELECT * FROM general_setting WHERE id_general_setting = "'.$id.'"');
82
-        if ($query && mysql_num_rows($query) == 1) {
82
+        if ($query && mysql_num_rows($query)==1) {
83 83
             $data = mysql_fetch_object($query);
84 84
         } else {
85 85
             die('Data general_setting tidak ditemukan');
Please login to merge, or discard this patch.
modul/mod_general_setting/aksi_general_setting.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     $datetime = date('Y-m-d G:i:s', $hour);
18 18
     $userid = $_SESSION['userid'];
19 19
 
20
-    if ($module == 'general_setting' and $act == 'input') {
20
+    if ($module=='general_setting' and $act=='input') {
21 21
         $id_module = $_POST['id_module'];
22 22
 
23 23
         $lokasi_file = $_FILES['fupload']['tmp_name'];
Please login to merge, or discard this patch.
modul/mod_poli/form_poli.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     if ($id) {
46 46
         $query = mysql_query('SELECT * FROM poli WHERE id_poli = "'.$id.'"');
47
-        if ($query && mysql_num_rows($query) == 1) {
47
+        if ($query && mysql_num_rows($query)==1) {
48 48
             $data = mysql_fetch_object($query);
49 49
         } else {
50 50
             die('Data modul tidak ditemukan');
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
           <?php if ($id) {
82 82
         ?>  
83 83
     
84
-            <?php if (@$data->aktif == 'Y') {
84
+            <?php if (@$data->aktif=='Y') {
85 85
             ?>
86 86
               
87 87
                 <div class="form-group">
Please login to merge, or discard this patch.