Passed
Push — master ( 673939...9426c1 )
by Tim
03:53
created
lib/Aggregator.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function dumpConfig()
65 65
     {
66
-        echo 'Statistics directory   : ' . $this->statdir . "\n";
67
-        echo 'Input file             : ' . $this->inputfile . "\n";
68
-        echo 'Offset                 : ' . $this->offset . "\n";
66
+        echo 'Statistics directory   : '.$this->statdir."\n";
67
+        echo 'Input file             : '.$this->inputfile."\n";
68
+        echo 'Offset                 : '.$this->offset."\n";
69 69
     }
70 70
 
71 71
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     public function debugInfo()
76 76
     {
77 77
         // 1024*1024=1048576
78
-        echo 'Memory usage           : ' . number_format(memory_get_usage() / 1048576, 2) . " MB\n";
78
+        echo 'Memory usage           : '.number_format(memory_get_usage() / 1048576, 2)." MB\n";
79 79
     }
80 80
 
81 81
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function loadMetadata()
86 86
     {
87
-        $filename = $this->statdir . '/.stat.metadata';
87
+        $filename = $this->statdir.'/.stat.metadata';
88 88
         $metadata = null;
89 89
         if (file_exists($filename)) {
90 90
             $metadata = unserialize(file_get_contents($filename));
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         $this->metadata['memory'] = memory_get_usage();
112 112
         $this->metadata['lastrun'] = time();
113 113
 
114
-        $filename = $this->statdir . '/.stat.metadata';
114
+        $filename = $this->statdir.'/.stat.metadata';
115 115
         file_put_contents($filename, serialize($this->metadata), LOCK_EX);
116 116
     }
117 117
 
@@ -126,17 +126,17 @@  discard block
 block discarded – undo
126 126
         $this->loadMetadata();
127 127
 
128 128
         if (!is_dir($this->statdir)) {
129
-            throw new \Exception('Statistics module: output dir does not exist [' . $this->statdir . ']');
129
+            throw new \Exception('Statistics module: output dir does not exist ['.$this->statdir.']');
130 130
         }
131 131
 
132 132
         if (!file_exists($this->inputfile)) {
133
-            throw new \Exception('Statistics module: input file does not exist [' . $this->inputfile . ']');
133
+            throw new \Exception('Statistics module: input file does not exist ['.$this->inputfile.']');
134 134
         }
135 135
 
136 136
         $file = fopen($this->inputfile, 'r');
137 137
 
138 138
         if ($file === false) {
139
-            throw new \Exception('Statistics module: unable to open file [' . $this->inputfile . ']');
139
+            throw new \Exception('Statistics module: unable to open file ['.$this->inputfile.']');
140 140
         }
141 141
 
142 142
         $logparser = new LogParser(
@@ -181,14 +181,14 @@  discard block
 block discarded – undo
181 181
             $action = trim($content[5]);
182 182
 
183 183
             if ($this->fromcmdline && ($i % 10000) == 0) {
184
-                echo "Read line " . $i . "\n";
184
+                echo "Read line ".$i."\n";
185 185
             }
186 186
 
187 187
             if ($debug) {
188 188
                 echo "----------------------------------------\n";
189
-                echo 'Log line: ' . $logline . "\n";
190
-                echo 'Date parse [' . substr($logline, 0, $this->statconfig->getValue('datelength', 15)) .
191
-                    '] to [' . date(DATE_RFC822, $epoch) . ']' . "\n";
189
+                echo 'Log line: '.$logline."\n";
190
+                echo 'Date parse ['.substr($logline, 0, $this->statconfig->getValue('datelength', 15)).
191
+                    '] to ['.date(DATE_RFC822, $epoch).']'."\n";
192 192
                 /** @var string $ret */
193 193
                 $ret = print_r($content, true);
194 194
                 echo htmlentities($ret);
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
                         }
362 362
                     }
363 363
 
364
-                    $filename = $this->statdir . '/' . $rulename . '-' . $tres . '-' . $fileno . '.stat';
364
+                    $filename = $this->statdir.'/'.$rulename.'-'.$tres.'-'.$fileno.'.stat';
365 365
                     if (file_exists($filename)) {
366 366
                         $previousData = unserialize(file_get_contents($filename));
367 367
                         $filledresult = $this->cummulateData($previousData, $filledresult);
Please login to merge, or discard this patch.