@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function dumpConfig(): void |
52 | 52 | { |
53 | - echo 'Statistics directory : ' . $this->statdir . "\n"; |
|
54 | - echo 'Input file : ' . $this->inputfile . "\n"; |
|
55 | - echo 'Offset : ' . $this->offset . "\n"; |
|
53 | + echo 'Statistics directory : '.$this->statdir."\n"; |
|
54 | + echo 'Input file : '.$this->inputfile."\n"; |
|
55 | + echo 'Offset : '.$this->offset."\n"; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | |
@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | public function clean(bool $debug = false): array |
65 | 65 | { |
66 | 66 | if (!is_dir($this->statdir)) { |
67 | - throw new Exception('Statistics module: output dir does not exist [' . $this->statdir . ']'); |
|
67 | + throw new Exception('Statistics module: output dir does not exist ['.$this->statdir.']'); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | if (!file_exists($this->inputfile)) { |
71 | - throw new Exception('Statistics module: input file does not exist [' . $this->inputfile . ']'); |
|
71 | + throw new Exception('Statistics module: input file does not exist ['.$this->inputfile.']'); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | $file = fopen($this->inputfile, 'r'); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $content = $logparser->parseContent($logline); |
98 | 98 | |
99 | 99 | if (($i % 10000) == 0) { |
100 | - echo "Read line " . $i . "\n"; |
|
100 | + echo "Read line ".$i."\n"; |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | $trackid = $content[4]; |
@@ -109,9 +109,9 @@ discard block |
||
109 | 109 | |
110 | 110 | if ($debug) { |
111 | 111 | echo "----------------------------------------\n"; |
112 | - echo 'Log line: ' . $logline . "\n"; |
|
113 | - echo 'Date parse [' . substr($logline, 0, $this->statconfig->getOptionalValue('datelength', 15)) . |
|
114 | - '] to [' . date(DATE_RFC822, $epoch) . ']' . "\n"; |
|
112 | + echo 'Log line: '.$logline."\n"; |
|
113 | + echo 'Date parse ['.substr($logline, 0, $this->statconfig->getOptionalValue('datelength', 15)). |
|
114 | + '] to ['.date(DATE_RFC822, $epoch).']'."\n"; |
|
115 | 115 | $ret = print_r($content, true); |
116 | 116 | echo htmlentities($ret); |
117 | 117 | if ($i >= 13) { |
@@ -147,14 +147,14 @@ discard block |
||
147 | 147 | */ |
148 | 148 | public function store(array $todelete, string $outputfile): void |
149 | 149 | { |
150 | - echo "Preparing to delete [" . count($todelete) . "] trackids\n"; |
|
150 | + echo "Preparing to delete [".count($todelete)."] trackids\n"; |
|
151 | 151 | |
152 | 152 | if (!is_dir($this->statdir)) { |
153 | - throw new Exception('Statistics module: output dir do not exists [' . $this->statdir . ']'); |
|
153 | + throw new Exception('Statistics module: output dir do not exists ['.$this->statdir.']'); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | if (!file_exists($this->inputfile)) { |
157 | - throw new Exception('Statistics module: input file do not exists [' . $this->inputfile . ']'); |
|
157 | + throw new Exception('Statistics module: input file do not exists ['.$this->inputfile.']'); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | $file = fopen($this->inputfile, 'r'); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $content = $logparser->parseContent($logline); |
187 | 187 | |
188 | 188 | if (($i % 10000) == 0) { |
189 | - echo "Read line " . $i . "\n"; |
|
189 | + echo "Read line ".$i."\n"; |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | $trackid = $content[4]; |