@@ -52,9 +52,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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]; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | foreach ($acl as $rule) { |
41 | 41 | if (!is_array($rule)) { |
42 | - throw new Error\Exception('Invalid rule in access control list: ' . var_export($rule, true)); |
|
42 | + throw new Error\Exception('Invalid rule in access control list: '.var_export($rule, true)); |
|
43 | 43 | } |
44 | 44 | if (count($rule) === 0) { |
45 | 45 | throw new Error\Exception('Empty rule in access control list.'); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $action = array_shift($rule); |
49 | 49 | if ($action !== 'allow' && $action !== 'deny') { |
50 | 50 | throw new Error\Exception( |
51 | - 'Invalid action in rule in access control list: ' . var_export($action, true) |
|
51 | + 'Invalid action in rule in access control list: '.var_export($action, true) |
|
52 | 52 | ); |
53 | 53 | } |
54 | 54 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | { |
66 | 66 | $config = Configuration::getOptionalConfig('acl.php'); |
67 | 67 | if (!$config->hasValue($id)) { |
68 | - throw new Error\Exception('No ACL with id ' . var_export($id, true) . ' in config/acl.php.'); |
|
68 | + throw new Error\Exception('No ACL with id '.var_export($id, true).' in config/acl.php.'); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | return $config->getArray($id); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | case 'or': |
129 | 129 | return self::opOr($attributes, $rule); |
130 | 130 | default: |
131 | - throw new Error\Exception('Invalid ACL operation: ' . var_export($op, true)); |
|
131 | + throw new Error\Exception('Invalid ACL operation: '.var_export($op, true)); |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 |