Passed
Push — master ( 0b8b91...ca50ab )
by Tim
08:16
created
lib/LogCleaner.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function dumpConfig(): void
54 54
     {
55
-        echo 'Statistics directory   : ' . $this->statdir . "\n";
56
-        echo 'Input file             : ' . $this->inputfile . "\n";
57
-        echo 'Offset                 : ' . $this->offset . "\n";
55
+        echo 'Statistics directory   : '.$this->statdir."\n";
56
+        echo 'Input file             : '.$this->inputfile."\n";
57
+        echo 'Offset                 : '.$this->offset."\n";
58 58
     }
59 59
 
60 60
 
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
     public function clean(bool $debug = false): array
67 67
     {
68 68
         if (!is_dir($this->statdir)) {
69
-            throw new Exception('Statistics module: output dir do not exists [' . $this->statdir . ']');
69
+            throw new Exception('Statistics module: output dir do not exists ['.$this->statdir.']');
70 70
         }
71 71
 
72 72
         if (!file_exists($this->inputfile)) {
73
-            throw new Exception('Statistics module: input file do not exists [' . $this->inputfile . ']');
73
+            throw new Exception('Statistics module: input file do not exists ['.$this->inputfile.']');
74 74
         }
75 75
 
76 76
         $file = fopen($this->inputfile, 'r');
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             $content = $logparser->parseContent($logline);
100 100
 
101 101
             if (($i % 10000) == 0) {
102
-                echo "Read line " . $i . "\n";
102
+                echo "Read line ".$i."\n";
103 103
             }
104 104
 
105 105
             $trackid = $content[4];
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
 
112 112
             if ($debug) {
113 113
                 echo "----------------------------------------\n";
114
-                echo 'Log line: ' . $logline . "\n";
115
-                echo 'Date parse [' . substr($logline, 0, $this->statconfig->getValue('datelength', 15)) .
116
-                    '] to [' . date(DATE_RFC822, $epoch) . ']' . "\n";
114
+                echo 'Log line: '.$logline."\n";
115
+                echo 'Date parse ['.substr($logline, 0, $this->statconfig->getValue('datelength', 15)).
116
+                    '] to ['.date(DATE_RFC822, $epoch).']'."\n";
117 117
                 $ret = print_r($content, true);
118 118
                 echo htmlentities($ret);
119 119
                 if ($i >= 13) {
@@ -150,14 +150,14 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function store(array $todelete, string $outputfile): void
152 152
     {
153
-        echo "Preparing to delete [" . count($todelete) . "] trackids\n";
153
+        echo "Preparing to delete [".count($todelete)."] trackids\n";
154 154
 
155 155
         if (!is_dir($this->statdir)) {
156
-            throw new Exception('Statistics module: output dir do not exists [' . $this->statdir . ']');
156
+            throw new Exception('Statistics module: output dir do not exists ['.$this->statdir.']');
157 157
         }
158 158
 
159 159
         if (!file_exists($this->inputfile)) {
160
-            throw new Exception('Statistics module: input file do not exists [' . $this->inputfile . ']');
160
+            throw new Exception('Statistics module: input file do not exists ['.$this->inputfile.']');
161 161
         }
162 162
 
163 163
         $file = fopen($this->inputfile, 'r');
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
             $content = $logparser->parseContent($logline);
190 190
 
191 191
             if (($i % 10000) == 0) {
192
-                echo "Read line " . $i . "\n";
192
+                echo "Read line ".$i."\n";
193 193
             }
194 194
 
195 195
             $trackid = $content[4];
Please login to merge, or discard this patch.