Passed
Push — master ( a95233...99c22e )
by Tim
07:58
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
                 /** @var string $ret */
118 118
                 $ret = print_r($content, true);
119 119
                 echo htmlentities($ret);
@@ -151,14 +151,14 @@  discard block
 block discarded – undo
151 151
      */
152 152
     public function store(array $todelete, string $outputfile): void
153 153
     {
154
-        echo "Preparing to delete [" . count($todelete) . "] trackids\n";
154
+        echo "Preparing to delete [".count($todelete)."] trackids\n";
155 155
 
156 156
         if (!is_dir($this->statdir)) {
157
-            throw new Exception('Statistics module: output dir do not exists [' . $this->statdir . ']');
157
+            throw new Exception('Statistics module: output dir do not exists ['.$this->statdir.']');
158 158
         }
159 159
 
160 160
         if (!file_exists($this->inputfile)) {
161
-            throw new Exception('Statistics module: input file do not exists [' . $this->inputfile . ']');
161
+            throw new Exception('Statistics module: input file do not exists ['.$this->inputfile.']');
162 162
         }
163 163
 
164 164
         $file = fopen($this->inputfile, 'r');
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             $content = $logparser->parseContent($logline);
191 191
 
192 192
             if (($i % 10000) == 0) {
193
-                echo "Read line " . $i . "\n";
193
+                echo "Read line ".$i."\n";
194 194
             }
195 195
 
196 196
             $trackid = $content[4];
Please login to merge, or discard this patch.