Test Failed
Pull Request — master (#274)
by
unknown
21:19
created
devices/ms/MsPeapProfile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     {
39 39
         $element = new \core\DeviceXMLmain();
40 40
         $element->setChild('ServerValidation', $this->getPeapServerValidation());
41
-        $element->setChild('FastReconnect','true');
41
+        $element->setChild('FastReconnect', 'true');
42 42
         $element->setChild('InnerEapOptional', 'false');
43 43
         $element->setChild('Eap', $this->getMsChapV2(), self::MS_BASEEAPCONN_NS);
44 44
         $element->setChild('EnableQuarantineChecks', $this->nea);
Please login to merge, or discard this patch.
devices/ms/MsOneX.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@
 block discarded – undo
43 43
     {
44 44
         $element = new \core\DeviceXMLmain();
45 45
         $element->setChild('Type', $this->eapConfig->type, self::MS_EAPCOMMON_NS);
46
-        $element->setChild('VendorId',0, self::MS_EAPCOMMON_NS);
47
-        $element->setChild('VendorType',0, self::MS_EAPCOMMON_NS);
46
+        $element->setChild('VendorId', 0, self::MS_EAPCOMMON_NS);
47
+        $element->setChild('VendorType', 0, self::MS_EAPCOMMON_NS);
48 48
         $element->setChild('AuthorId', $this->eapConfig->authorId, self::MS_EAPCOMMON_NS);
49 49
         return($element);
50 50
     }
Please login to merge, or discard this patch.
devices/ms/MsWlanProfile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
         $dom = new \DOMDocument('1.0', 'utf-8');
74 74
         $root = $dom->createElement($rootname);
75 75
         $dom->appendChild($root);
76
-        $ns = $dom->createAttributeNS( null, 'xmlns' );
76
+        $ns = $dom->createAttributeNS(null, 'xmlns');
77 77
         $ns->value = "http://www.microsoft.com/networking/WLAN/profile/v1";
78 78
         $root->appendChild($ns);        
79 79
         \core\DeviceXMLmain::marshalObject($dom, $root, 'WLANprofile', $this->getWLANprofile(), '', true);
Please login to merge, or discard this patch.
devices/ms/WindowsCommon.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
         $this->loggerInstance->debug(5, "translateFile($source_name, $output_name)\n");
104 104
         ob_start();
105
-        $this->loggerInstance->debug(5, $this->module_path . '/Files/' . $this->device_id . '/' . $source_name . "\n");
105
+        $this->loggerInstance->debug(5, $this->module_path.'/Files/'.$this->device_id.'/'.$source_name."\n");
106 106
         $source = $this->findSourceFile($source_name);
107 107
 
108 108
         if ($source !== false) { // if there is no file found, don't attempt to include an uninitialised variable
@@ -229,8 +229,8 @@  discard block
 block discarded – undo
229 229
         $out .= sprintf(_("%s installer will be in the form of an EXE file. It will configure %s on your device, by creating wireless network profiles.<p>When you click the download button, the installer will be saved by your browser. Copy it to the machine you want to configure and execute."), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::CONSORTIUM['display_name']);
230 230
         $out .= "<p>";
231 231
         if ($networksCount > $configCount) {
232
-            $out .= sprintf(ngettext("In addition to <strong>%s</strong> the installer will also configure access to:", "In addition to <strong>%s</strong> the installer will also configure access to the following networks:", $networksCount - $configCount), implode(', ', $configNetworkList)) . " ";
233
-            $out .= '<strong>' . join('</strong>, <strong>', array_diff($networkList, $configNetworkList)) . '</strong>';
232
+            $out .= sprintf(ngettext("In addition to <strong>%s</strong> the installer will also configure access to:", "In addition to <strong>%s</strong> the installer will also configure access to the following networks:", $networksCount - $configCount), implode(', ', $configNetworkList))." ";
233
+            $out .= '<strong>'.join('</strong>, <strong>', array_diff($networkList, $configNetworkList)).'</strong>';
234 234
             $out .= "<p>";
235 235
         }
236 236
 // TODO - change this below
@@ -338,13 +338,13 @@  discard block
 block discarded – undo
338 338
      */
339 339
     protected function signInstaller()
340 340
     {
341
-        $fileName = $this->installerBasename . '.exe';
341
+        $fileName = $this->installerBasename.'.exe';
342 342
         if (!$this->sign) {
343 343
             rename("installer.exe", $fileName);
344 344
             return $fileName;
345 345
         }
346 346
         // are actually signing
347
-        $outputFromSigning = system($this->sign . " installer.exe '$fileName' > /dev/null");
347
+        $outputFromSigning = system($this->sign." installer.exe '$fileName' > /dev/null");
348 348
         if ($outputFromSigning === false) {
349 349
             $this->loggerInstance->debug(2, "Signing the WindowsCommon installer $fileName FAILED!\n");
350 350
         }
@@ -358,12 +358,12 @@  discard block
 block discarded – undo
358 358
      */
359 359
     protected function compileNSIS()
360 360
     {
361
-        $makensis = \config\ConfAssistant::PATHS['makensis'] . " -INPUTCHARSET UTF8";
361
+        $makensis = \config\ConfAssistant::PATHS['makensis']." -INPUTCHARSET UTF8";
362 362
         $lcAll = getenv("LC_ALL");
363 363
         putenv("LC_ALL=en_US.UTF-8");
364
-        $command = $makensis . ' -V4 cat.NSI > nsis.log 2>&1';
364
+        $command = $makensis.' -V4 cat.NSI > nsis.log 2>&1';
365 365
         system($command);
366
-        putenv("LC_ALL=" . $lcAll);
366
+        putenv("LC_ALL=".$lcAll);
367 367
         $this->loggerInstance->debug(4, "compileNSIS:$command\n");
368 368
     }
369 369
 
@@ -380,10 +380,10 @@  discard block
 block discarded – undo
380 380
             'email' => 'SUPPORT',
381 381
             'url' => 'URL',
382 382
         ];
383
-        $s = "support_" . $type . "_substitute";
383
+        $s = "support_".$type."_substitute";
384 384
         $substitute = $this->translateString($this->$s);
385
-        $returnValue = !empty($attr['support:' . $type][0]) ? $attr['support:' . $type][0] : $substitute;
386
-        return '!define ' . $supportString[$type] . ' "' . $returnValue . '"' . "\n";
385
+        $returnValue = !empty($attr['support:'.$type][0]) ? $attr['support:'.$type][0] : $substitute;
386
+        return '!define '.$supportString[$type].' "'.$returnValue.'"'."\n";
387 387
     }
388 388
 
389 389
     /**
@@ -396,18 +396,18 @@  discard block
 block discarded – undo
396 396
     {
397 397
         $fcontents = '';
398 398
         if ($attr['internal:profile_count'][0] > 1) {
399
-            $fcontents .= "\n" . '!define USER_GROUP "' . $this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0])) . '"
399
+            $fcontents .= "\n".'!define USER_GROUP "'.$this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0])).'"
400 400
 ';
401 401
         }
402 402
         $fcontents .= '
403
-Caption "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0])) . '"
404
-!define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0])) . '"
405
-!define VERSION "' . \core\CAT::VERSION_MAJOR . '.' . \core\CAT::VERSION_MINOR . '"
403
+Caption "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0])).'"
404
+!define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprintNsis(_("%s installer for %s")), \config\ConfAssistant::CONSORTIUM['display_name'], $attr['general:instname'][0])).'"
405
+!define VERSION "' . \core\CAT::VERSION_MAJOR.'.'.\core\CAT::VERSION_MINOR.'"
406 406
 !define INSTALLER_NAME "installer.exe"
407
-!define LANG "' . $this->lang . '"
408
-!define LOCALE "' . preg_replace('/\..*$/', '', \config\Master::LANGUAGES[$this->languageInstance->getLang()]['locale']) . '"
407
+!define LANG "' . $this->lang.'"
408
+!define LOCALE "' . preg_replace('/\..*$/', '', \config\Master::LANGUAGES[$this->languageInstance->getLang()]['locale']).'"
409 409
 ;--------------------------------
410
-!define ORGANISATION "' . $this->translateString($attr['general:instname'][0]) . '"
410
+!define ORGANISATION "' . $this->translateString($attr['general:instname'][0]).'"
411 411
 ';
412 412
         $fcontents .= $this->getSupport($attr, 'email');
413 413
         $fcontents .= $this->getSupport($attr, 'url');
@@ -415,18 +415,18 @@  discard block
 block discarded – undo
415 415
             $fcontents .= '!define WIRED
416 416
         ';
417 417
         }
418
-        $fcontents .= '!define PROVIDERID "urn:UUID:' . $this->deviceUUID . '"
418
+        $fcontents .= '!define PROVIDERID "urn:UUID:'.$this->deviceUUID.'"
419 419
 ';
420 420
         if (!empty($attr['internal:realm'][0])) {
421
-            $fcontents .= '!define REALM "' . $attr['internal:realm'][0] . '"
421
+            $fcontents .= '!define REALM "'.$attr['internal:realm'][0].'"
422 422
 ';
423 423
         }
424 424
         if (!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) {
425
-            $fcontents .= '!define HINT_USER_INPUT "' . $attr['internal:hint_userinput_suffix'][0] . '"
425
+            $fcontents .= '!define HINT_USER_INPUT "'.$attr['internal:hint_userinput_suffix'][0].'"
426 426
 ';
427 427
         }
428 428
         if (!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) {
429
-            $fcontents .= '!define VERIFY_USER_REALM_INPUT "' . $attr['internal:verify_userinput_suffix'][0] . '"
429
+            $fcontents .= '!define VERIFY_USER_REALM_INPUT "'.$attr['internal:verify_userinput_suffix'][0].'"
430 430
 ';
431 431
         }
432 432
         $fcontents .= $this->msInfoFile($attr);
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
             $out .= '!define EXTERNAL_INFO "';
448 448
 //  $this->loggerInstance->debug(4,"Info file type ".$attr['support:info_file'][0]['mime']."\n");
449 449
             if ($attr['internal:info_file'][0]['mime'] == 'rtf') {
450
-                $out = '!define LICENSE_FILE "' . $attr['internal:info_file'][0]['name'];
450
+                $out = '!define LICENSE_FILE "'.$attr['internal:info_file'][0]['name'];
451 451
             } elseif ($attr['internal:info_file'][0]['mime'] == 'txt') {
452 452
                 $infoFile = file_get_contents($attr['internal:info_file'][0]['name']);
453 453
                 if ($infoFile === false) {
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
                     $out = '!define LICENSE_FILE " info_f.txt';
461 461
                 }
462 462
             } else {
463
-                $out = '!define EXTERNAL_INFO "' . $attr['internal:info_file'][0]['name'];
463
+                $out = '!define EXTERNAL_INFO "'.$attr['internal:info_file'][0]['name'];
464 464
             }
465 465
 
466 466
             $out .= "\"\n";
Please login to merge, or discard this patch.
core/DeviceXMLmain.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
                 $node->appendChild($childNode);
212 212
             }
213 213
             if (!empty($namespace)) {
214
-                $ns = $domElement->createAttributeNS(null,'xmlns');
214
+                $ns = $domElement->createAttributeNS(null, 'xmlns');
215 215
                 $ns->value = $namespace;
216 216
                 $childNode->appendChild($ns);  
217 217
             }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                 $nextChild = $domElement->createElement($nameC, $cl);    
239 239
                 $childNode->appendChild($nextChild);
240 240
                 if (!empty($namespaceC)) {
241
-                    $ns = $domElement->createAttributeNS(null,'xmlns');
241
+                    $ns = $domElement->createAttributeNS(null, 'xmlns');
242 242
                     $ns->value = $namespaceC;
243 243
                     $nextChild->appendChild($ns);  
244 244
                 }
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
                             $childNode->appendChild($nextChild);
261 261
                         }
262 262
                         if (!empty($namespaceC)) {
263
-                            $ns = $domElement->createAttributeNS(null,'xmlns');
263
+                            $ns = $domElement->createAttributeNS(null, 'xmlns');
264 264
                             $ns->value = $namespaceC;
265 265
                             $nextChild->appendChild($ns);  
266 266
                         }
Please login to merge, or discard this patch.
config/ConfAssistant-template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                     ], 
91 91
                 'condition' => TRUE],
92 92
             'OpenRoaming® (%REALM%)' => [
93
-                'ssid' => [],     /* OpenRoaming has left SSIDs behind */
93
+                'ssid' => [], /* OpenRoaming has left SSIDs behind */
94 94
                 'oi' => [
95 95
                     '5A03BA0000', /* OpenRoaming/AllIdentities/SettlementFree/NoPersonalData/BaselineQoS */
96 96
                     '5A03BA0800', /* OpenRoaming/EduIdentities/SettlementFree/NoPersonalData/BaselineQoS */
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         'makensis' => 'makensis',
156 156
         'zip' => 'zip',
157 157
         'trust-store-mozilla' => '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem',
158
-        'trust-store-custom' => __DIR__ . "/known-roots.pem",
158
+        'trust-store-custom' => __DIR__."/known-roots.pem",
159 159
     ];
160 160
 
161 161
     /**
@@ -193,13 +193,13 @@  discard block
 block discarded – undo
193 193
             'db' => 'radacct',
194 194
             'user' => 'someuser',
195 195
             'pass' => 'somepass',
196
-            'readonly' => TRUE,],
196
+            'readonly' => TRUE, ],
197 197
         'RADIUS_2' => [
198 198
             'host' => 'auth-2.hosted.eduroam.org',
199 199
             'db' => 'radacct',
200 200
             'user' => 'someuser',
201 201
             'pass' => 'somepass',
202
-            'readonly' => TRUE,],
202
+            'readonly' => TRUE, ],
203 203
     ];
204 204
 
205 205
     /**
Please login to merge, or discard this patch.
devices/linux/DeviceLinuxSh.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $installerPath = $this->installerBasename.".sh";
52 52
         $this->copyFile("eduroam_linux_main.sh", $installerPath);
53 53
 
54
-        if ( !file_exists($installerPath) ) {
54
+        if (!file_exists($installerPath)) {
55 55
             throw new Exception('File not found.');
56 56
         }
57 57
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             fwrite($installer, 'printf -v INIT_CONFIRMATION "$INIT_CONFIRMATION_TMP" "$ORGANISATION"'."\n\n");
69 69
             fwrite($installer, 'main "$@"; exit'."\n");
70 70
         } catch (Exception $e) {
71
-            echo 'Error message: ' .$e->getMessage();
71
+            echo 'Error message: '.$e->getMessage();
72 72
         } finally {
73 73
             fclose($installer);
74 74
             return($installerPath);
@@ -204,11 +204,11 @@  discard block
 block discarded – undo
204 204
            $config['USER_REALM'] = $this->attributes['internal:realm'][0];
205 205
         }
206 206
 
207
-        if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) {
207
+        if (!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) {
208 208
             $configRaw['HINT_USER_INPUT'] = true;
209 209
         }
210 210
 
211
-        if(!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) {
211
+        if (!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) {
212 212
             $configRaw['VERIFY_USER_REALM_INPUT'] = true;
213 213
         } else {
214 214
             $configRaw['VERIFY_USER_REALM_INPUT'] = false;
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         }
220 220
 
221 221
         foreach ($configRaw as $name => $value) {
222
-            fwrite($file, $name ."=". $value."\n");
222
+            fwrite($file, $name."=".$value."\n");
223 223
         }
224 224
 
225 225
         if ($tou === '') {
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
             }
284 284
             $out .= "'DNS:$oneServer'";
285 285
         }
286
-        return "(".$out. ")";
286
+        return "(".$out.")";
287 287
     }
288 288
 
289 289
     /**
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
      *
324 324
      * @return string
325 325
      */
326
-    private function mkCAfile(){
326
+    private function mkCAfile() {
327 327
         $out = '';
328 328
         $cAlist = $this->attributes['internal:CAs'][0];
329 329
         foreach ($cAlist as $oneCa) {
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
      */
340 340
     private function mkIntro() {
341 341
         \core\common\Entity::intoThePotatoes();
342
-        $out = _("This installer has been prepared for %s").'\n\n'._("More information and comments:").'\n\nE-Mail: %s\nWWW: %s\n\n' .
342
+        $out = _("This installer has been prepared for %s").'\n\n'._("More information and comments:").'\n\nE-Mail: %s\nWWW: %s\n\n'.
343 343
             _("Installer created with software from the GEANT project.");
344 344
         \core\common\Entity::outOfThePotatoes();
345 345
         return $out;
Please login to merge, or discard this patch.
devices/linux/DeviceLinux.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     public function writeInstaller() {
61 61
         $installerPath = $this->installerBasename.".py";
62 62
         $this->copyFile("main.py", $installerPath);
63
-        $installer = fopen($installerPath,"a");
63
+        $installer = fopen($installerPath, "a");
64 64
         if ($installer === FALSE) {
65 65
             throw new Exception("Unable to open installer file for writing!");
66 66
         }
@@ -202,11 +202,11 @@  discard block
 block discarded – undo
202 202
            $config['user_realm'] = $this->attributes['internal:realm'][0];
203 203
         }
204 204
         
205
-        if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) {
205
+        if (!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) {
206 206
             $configRaw['hint_user_input'] = "True";
207 207
         }
208 208
         
209
-        if(!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) {
209
+        if (!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) {
210 210
             $configRaw['verify_user_realm_input'] = "True";
211 211
         }
212 212
         
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             }
280 280
             $out .= "'DNS:$oneServer'";
281 281
         }
282
-        return "[".$out. "]";
282
+        return "[".$out."]";
283 283
     }
284 284
 
285 285
     /**
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
      * 
320 320
      * @return string
321 321
      */
322
-    private function mkCAfile(){
322
+    private function mkCAfile() {
323 323
         $out = '';
324 324
         $cAlist = $this->attributes['internal:CAs'][0];
325 325
         foreach ($cAlist as $oneCa) {
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
      */
336 336
     private function mkIntro() {
337 337
         \core\common\Entity::intoThePotatoes();
338
-        $out = _("This installer has been prepared for {0}").'\n\n'._("More information and comments:").'\n\nEMAIL: {1}\nWWW: {2}\n\n' .
338
+        $out = _("This installer has been prepared for {0}").'\n\n'._("More information and comments:").'\n\nEMAIL: {1}\nWWW: {2}\n\n'.
339 339
             _("Installer created with software from the GEANT project.");
340 340
         \core\common\Entity::outOfThePotatoes();
341 341
         return $out;
Please login to merge, or discard this patch.
web/admin/inc/profileAutodetectCA.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
  */
21 21
 ?>
22 22
 <?php
23
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php";
23
+require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php";
24 24
 
25 25
 $auth = new \web\lib\admin\Authentication();
26 26
 $languageInstance = new \core\common\Language();
Please login to merge, or discard this patch.