Test Failed
Push — master ( 9c289d...85e68f )
by Stefan
10:04
created
core/common/Language.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
         $loggerInstance = new \core\common\Logging();
76 76
         $olddomain = textdomain(NULL);
77 77
         $loggerInstance->debug(4, "set_locale($domain)\n");
78
-        $loggerInstance->debug(4, ROOT . "\n");
78
+        $loggerInstance->debug(4, ROOT."\n");
79 79
         textdomain($domain);
80
-        bindtextdomain($domain, ROOT . "/translation/");
80
+        bindtextdomain($domain, ROOT."/translation/");
81 81
         bind_textdomain_codeset($domain, "UTF-8");
82 82
         return $olddomain;
83 83
     }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
             // check if this language is supported by the CAT config
131 131
             foreach (\config\Master::LANGUAGES as $language => $value) {
132
-                if (preg_match("/^" . $language . ".*/", $tryLang)) {
132
+                if (preg_match("/^".$language.".*/", $tryLang)) {
133 133
                     $localeTmp = $value['locale'];
134 134
                     $langIndex = $language; // ???
135 135
                     break;
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                 }
145 145
             }
146 146
         }
147
-        putenv("LC_ALL=" . $theLocale);
147
+        putenv("LC_ALL=".$theLocale);
148 148
         $_SESSION['language'] = $langIndex;
149 149
         $loggerInstance = new \core\common\Logging();
150 150
         $loggerInstance->debug(4, "selected lang:$langIndex:$theLocale\n");
Please login to merge, or discard this patch.
core/common/Entity.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     public function __construct()
111 111
     {
112 112
         $this->loggerInstance = new Logging();
113
-        $this->loggerInstance->debug(3, "--- BEGIN constructing class " . get_class($this) . " .\n");
113
+        $this->loggerInstance->debug(3, "--- BEGIN constructing class ".get_class($this)." .\n");
114 114
         $this->languageInstance = new Language();
115 115
         Entity::intoThePotatoes("core");
116 116
         // some config elements are displayable. We need some dummies to 
@@ -129,13 +129,13 @@  discard block
 block discarded – undo
129 129
         $dummy_organisation2a = _("organization");
130 130
         $dummy_organisation3 = _("entity");
131 131
         // and do something useless with the strings so that there's no "unused" complaint
132
-        if (strlen($dummy_NRO . $dummy_idp1 . $dummy_idp2 . $dummy_idp3 . $dummy_hotspot1 . $dummy_hotspot2 . $dummy_hotspot3 . $dummy_organisation1 . $dummy_organisation2 . $dummy_organisation2a . $dummy_organisation3) < 0) {
132
+        if (strlen($dummy_NRO.$dummy_idp1.$dummy_idp2.$dummy_idp3.$dummy_hotspot1.$dummy_hotspot2.$dummy_hotspot3.$dummy_organisation1.$dummy_organisation2.$dummy_organisation2a.$dummy_organisation3) < 0) {
133 133
             throw new Exception("Strings are usually not shorter than 0 characters. We've encountered a string blackhole.");
134 134
         }
135
-        $xyzVariableFed = \config\ConfAssistant::CONSORTIUM['nomenclature_federation'] . "";
136
-        $xyzVariableIdP = \config\ConfAssistant::CONSORTIUM['nomenclature_idp'] . "";
137
-        $xyzVariableHotspot = \config\ConfAssistant::CONSORTIUM['nomenclature_hotspot'] . "";
138
-        $xyzVariableParticipant = \config\ConfAssistant::CONSORTIUM['nomenclature_participant'] . "";
135
+        $xyzVariableFed = \config\ConfAssistant::CONSORTIUM['nomenclature_federation']."";
136
+        $xyzVariableIdP = \config\ConfAssistant::CONSORTIUM['nomenclature_idp']."";
137
+        $xyzVariableHotspot = \config\ConfAssistant::CONSORTIUM['nomenclature_hotspot']."";
138
+        $xyzVariableParticipant = \config\ConfAssistant::CONSORTIUM['nomenclature_participant']."";
139 139
         Entity::$nomenclature_fed = _($xyzVariableFed);
140 140
         Entity::$nomenclature_idp = _($xyzVariableIdP);
141 141
         Entity::$nomenclature_hotspot = _($xyzVariableHotspot);
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      */
152 152
     public function __destruct()
153 153
     {
154
-        (new Logging())->debug(5, "--- KILL Destructing class " . get_class($this) . " .\n");
154
+        (new Logging())->debug(5, "--- KILL Destructing class ".get_class($this)." .\n");
155 155
     }
156 156
 
157 157
     /**
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     public static function createTemporaryDirectory($purpose = 'installer', $failIsFatal = 1)
185 185
     {
186 186
         $loggerInstance = new Logging();
187
-        $name = md5(time() . rand());
187
+        $name = md5(time().rand());
188 188
         $path = ROOT;
189 189
         switch ($purpose) {
190 190
             case 'silverbullet':
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
             default:
203 203
                 throw new Exception("unable to create temporary directory due to unknown purpose: $purpose\n");
204 204
         }
205
-        $tmpDir = $path . '/' . $name;
205
+        $tmpDir = $path.'/'.$name;
206 206
         $loggerInstance->debug(4, "temp dir: $purpose : $tmpDir\n");
207 207
         if (!mkdir($tmpDir, 0700, true)) {
208 208
             if ($failIsFatal) {
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public static function rrmdir($dir)
225 225
     {
226
-        foreach (glob($dir . '/*') as $file) {
226
+        foreach (glob($dir.'/*') as $file) {
227 227
             if (is_dir($file)) {
228 228
                 Entity::rrmdir($file);
229 229
             } else {
@@ -249,12 +249,12 @@  discard block
 block discarded – undo
249 249
         }
250 250
         // these substr() are guaranteed to yield actual string data, as the
251 251
         // base string is an MD5 hash - has sufficient length
252
-        $uuid = /** @scrutinizer ignore-type */ substr($chars, 0, 8) . '-';
253
-        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 8, 4) . '-';
254
-        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 12, 4) . '-';
255
-        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 16, 4) . '-';
252
+        $uuid = /** @scrutinizer ignore-type */ substr($chars, 0, 8).'-';
253
+        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 8, 4).'-';
254
+        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 12, 4).'-';
255
+        $uuid .= /** @scrutinizer ignore-type */ substr($chars, 16, 4).'-';
256 256
         $uuid .= /** @scrutinizer ignore-type */ substr($chars, 20, 12);
257
-        return $prefix . $uuid;
257
+        return $prefix.$uuid;
258 258
     }
259 259
 
260 260
     /**
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
         for ($i = count($trace); $i--; $i > 0) {
296 296
             if (isset($trace[$i - 1]['class']) && preg_match('/Entity/', $trace[$i - 1]['class'])) {
297 297
                 if ($showTrace) {
298
-                    echo "FOUND caller: " . /** @scrutinizer ignore-type */ print_r($trace[$i], true) . " - class is " . $trace[$i]['class'];
298
+                    echo "FOUND caller: "./** @scrutinizer ignore-type */ print_r($trace[$i], true)." - class is ".$trace[$i]['class'];
299 299
                 }
300 300
                 $caller = $trace[$i];
301 301
                 break;
@@ -305,8 +305,8 @@  discard block
 block discarded – undo
305 305
         // otherwise, on the filename relative to ROOT
306 306
         $myName = $caller['class'] ?? substr($caller['file'], strlen(ROOT));
307 307
         if ($showTrace === TRUE) {
308
-            echo "<pre>" . /** @scrutinizer ignore-type */ print_r($trace, true) . "</pre>";
309
-            echo "CLASS = " . $myName . "<br/>";
308
+            echo "<pre>"./** @scrutinizer ignore-type */ print_r($trace, true)."</pre>";
309
+            echo "CLASS = ".$myName."<br/>";
310 310
         }
311 311
         if (preg_match("/diag/", $myName) == 1) {
312 312
             $ret = "diagnostics";
@@ -340,11 +340,11 @@  discard block
 block discarded – undo
340 340
         if ($catalogue === NULL) {
341 341
             $theCatalogue = Entity::determineOwnCatalogue($trace);
342 342
             textdomain($theCatalogue);
343
-            bindtextdomain($theCatalogue, ROOT . "/translation/");
343
+            bindtextdomain($theCatalogue, ROOT."/translation/");
344 344
             bind_textdomain_codeset($theCatalogue, "UTF-8");
345 345
         } else {
346 346
             textdomain($catalogue);
347
-            bindtextdomain($catalogue, ROOT . "/translation/");
347
+            bindtextdomain($catalogue, ROOT."/translation/");
348 348
             bind_textdomain_codeset($catalogue, "UTF-8");
349 349
         }
350 350
     }
Please login to merge, or discard this patch.