Passed
Push — master ( 3fa61b...51ad56 )
by Tim
02:34
created
config-templates/module_statistics.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     'statrules' => [
98 98
         'sloratio' => [
99 99
             'name'         => 'SLO to SSO ratio',
100
-            'descr'        => 'Comparison of the number of Single Log-Out compared to Single Sign-On.' .
100
+            'descr'        => 'Comparison of the number of Single Log-Out compared to Single Sign-On.'.
101 101
                 ' Graph shows how many logouts where initiated for each Single Sign-On.',
102 102
             'type'         => 'calculated',
103 103
             'presenter'    => 'statistics:Ratio',
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         ],
110 110
         'ssomulti' => [
111 111
             'name'         => 'Requests per session',
112
-            'descr'        => 'Number of SSO request pairs exchanged between IdP and SP within the same IdP session.' .
112
+            'descr'        => 'Number of SSO request pairs exchanged between IdP and SP within the same IdP session.'.
113 113
                 ' A high number indicates that the session at the SP is timing out faster than at the IdP.',
114 114
             'type'         => 'calculated',
115 115
             'presenter'    => 'statistics:Ratio',
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         ],
152 152
         'consent' => [
153 153
             'name'         => 'Consent',
154
-            'descr'        => 'Consent statistics. Every time a user logs in to a service an entry is logged for' .
154
+            'descr'        => 'Consent statistics. Every time a user logs in to a service an entry is logged for'.
155 155
                 ' one of three states: consent was found, consent was not found or consent storage was not available.',
156 156
             'action'       => 'consent',
157 157
             'col'          => 6,
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         ],
163 163
         'consentresponse' => [
164 164
             'name'         => 'Consent response',
165
-            'descr'        => 'Consent response statistics. Every time a user accepts consent,' .
165
+            'descr'        => 'Consent response statistics. Every time a user accepts consent,'.
166 166
                 ' it is logged whether the user selected to remember the consent to next time.',
167 167
             'action'       => 'consentResponse',
168 168
             'col'          => 6,
Please login to merge, or discard this patch.
src/Controller/Statistics.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
124 124
         $t->data['post_rule'] = $this->getBaseURL($t, 'post', 'rule');
125 125
         $t->data['post_res'] = $this->getBaseURL($t, 'post', 'res');
126 126
         $t->data['post_time'] = $this->getBaseURL($t, 'post', 'time');
127
-        $t->data['available_timeres'] = [];;
128
-        $t->data['available_times'] = [];;
127
+        $t->data['available_timeres'] = []; ;
128
+        $t->data['available_times'] = []; ;
129 129
 
130 130
         if (isset($preferRule2)) {
131 131
             $statrule = $ruleset->getRule($preferRule2);
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                     $data = $dataset->getDebugData();
184 184
                     foreach ($data as $de) {
185 185
                         if (isset($de[1])) {
186
-                            echo '"' . $de[0] . '",' . $de[1] . "\n";
186
+                            echo '"'.$de[0].'",'.$de[1]."\n";
187 187
                         }
188 188
                     }
189 189
                     exit;
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
             }
242 242
         }
243 243
         if ($type === 'get') {
244
-            return Module::getModuleURL("statistics/") . '?' . http_build_query($vars, '', '&');
244
+            return Module::getModuleURL("statistics/").'?'.http_build_query($vars, '', '&');
245 245
         }
246 246
         return $vars;
247 247
     }
Please login to merge, or discard this patch.
src/LogCleaner.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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];
Please login to merge, or discard this patch.