Test Failed
Push — master ( 81a1e2...d0d67d )
by Stefan
32:51 queued 20:40
created
web/diag/radius_tests.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -374,7 +374,7 @@
 block discarded – undo
374 374
         throw new Exception("Unknown test requested: default case reached!");
375 375
 }
376 376
 $returnarray['datetime'] = date("Y-m-d H:i:s");
377
-if ($token!= '' && is_dir($jsonDir.'/'.$token)) {
377
+if ($token != '' && is_dir($jsonDir.'/'.$token)) {
378 378
     @mkdir($jsonDir.'/'.$token, 0777, true);
379 379
 }
380 380
 $json_data = json_encode($returnarray);
Please login to merge, or discard this patch.
web/admin/edit_federation.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 ?>
28 28
 <?php
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $auth = new \web\lib\admin\Authentication();
32 32
 $deco = new \web\lib\admin\PageDecoration();
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
         ?>
71 71
     </h1>
72 72
     <div class='infobox'>
73
-        <h2><?php $tablecaption = sprintf(_("%s Properties"),$uiElements->nomenclatureFed); echo $tablecaption?></h2>
73
+        <h2><?php $tablecaption = sprintf(_("%s Properties"), $uiElements->nomenclatureFed); echo $tablecaption?></h2>
74 74
         <table>
75
-            <caption><?php echo $tablecaption;?></caption>
75
+            <caption><?php echo $tablecaption; ?></caption>
76 76
             <tr>
77
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
78
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
79
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
77
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
78
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
79
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
80 80
             </tr>
81 81
             <tr>
82 82
                 <td><?php echo _("Country:"); ?></td>
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
         </table>
88 88
     </div>
89 89
     <?php
90
-    echo "<form enctype='multipart/form-data' action='edit_federation_result.php?fed_id=$my_fed->tld" . "' method='post' accept-charset='UTF-8'>
91
-              <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>";
90
+    echo "<form enctype='multipart/form-data' action='edit_federation_result.php?fed_id=$my_fed->tld"."' method='post' accept-charset='UTF-8'>
91
+              <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>";
92 92
     ?>
93 93
     <fieldset class="option_container">
94
-        <legend><strong><?php echo sprintf(_("%s Properties"),$uiElements->nomenclatureFed); ?></strong></legend>
94
+        <legend><strong><?php echo sprintf(_("%s Properties"), $uiElements->nomenclatureFed); ?></strong></legend>
95 95
         <?php
96 96
         $optionDisplay = new \web\lib\admin\OptionDisplay($fed_options, \core\Options::LEVEL_FED);
97 97
         echo $optionDisplay->prefilledOptionTable("fed", $my_fed->tld);
@@ -101,10 +101,10 @@  discard block
 block discarded – undo
101 101
     <?php
102 102
     echo "<div>";
103 103
     if ($editMode === 'fullaccess') {
104
-        echo "<button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button>";
104
+        echo "<button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button>";
105 105
         $discardLabel = _("Discard changes");
106 106
     } else {
107 107
         $discardLabel = _("Return");
108 108
     }
109
-    echo "<button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_federation.php?fed_id=$fedPost\"'>" . $discardLabel . "</button></div></form>";
109
+    echo "<button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_federation.php?fed_id=$fedPost\"'>".$discardLabel."</button></div></form>";
110 110
     echo $deco->footer();
Please login to merge, or discard this patch.
utils/test_openroaming.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * License: see the web/copyright.php file in the file structure
9 9
  * ******************************************************************************
10 10
  */
11
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
11
+require_once dirname(dirname(__FILE__))."/config/_config.php";
12 12
 
13 13
 /**
14 14
  * The sctipt will be called from crontab
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 }
29 29
 
30 30
 
31
-while ( $row = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allOpenRoamingProfiles)) {
31
+while ($row = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allOpenRoamingProfiles)) {
32 32
     $profileId = $row->profile_id;
33 33
     $profile = \core\ProfileFactory::instantiate($profileId);
34 34
     $res = $profile->openroamingRedinessTest();
Please login to merge, or discard this patch.
utils/update_monitor_copy.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  * update the local copy
25 25
  */
26 26
 
27
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
27
+require_once dirname(dirname(__FILE__))."/config/_config.php";
28 28
 setlocale(LC_CTYPE, "en_US.UTF-8");
29 29
 
30 30
 class updateFromMonitor {
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $tmp_table = 'tmp_'.$table_name;
114 114
         if ($this->tablesource[$table_name] == 'eduroam') {
115 115
             $this->db_local->select_db('monitor_copy');
116
-        } elseif($this->tablesource[$table_name] == 'eduroamv2') {
116
+        } elseif ($this->tablesource[$table_name] == 'eduroamv2') {
117 117
             $this->db_local->select_db('eduroamv2');
118 118
         }
119 119
         $this->db_local->query("CREATE TEMPORARY TABLE $tmp_table SELECT * FROM $table LIMIT 0");
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $this->db->query("SET NAMES 'utf8'");
123 123
         $this->db_local->query("SET NAMES 'utf8mb4'");
124 124
         $result = $this->db->query("SELECT * FROM $table");
125
-        $queryFields = implode(',', array_column($this->fields[$table_name],0));
125
+        $queryFields = implode(',', array_column($this->fields[$table_name], 0));
126 126
         while ($row = $result->fetch_assoc()) {
127 127
             $v = [];
128 128
             foreach ($this->fields[$table_name] as $field) {
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                     }
141 141
                 }
142 142
             }
143
-            $queryValues = implode(',',$v);
143
+            $queryValues = implode(',', $v);
144 144
             $query = "INSERT INTO $tmp_table (".$queryFields.") VALUES (".$queryValues.")";
145 145
             $this->db_local->query($query);
146 146
         }
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         $tmp_table = 'tmp_'.$table_name;
153 153
         if ($this->tablesource[$table_name] == 'eduroam') {
154 154
                 $this->db_local->select_db('monitor_copy');
155
-        } elseif($this->tablesource[$table_name] == 'eduroamv2') {
155
+        } elseif ($this->tablesource[$table_name] == 'eduroamv2') {
156 156
                 $this->db_local->select_db('eduroamv2');
157 157
         }
158 158
         $this->db_local->query("SET NAMES 'utf8mb4'");
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
     }
162 162
 
163 163
     private function escape($inp) {
164
-        $out=str_replace('\\','\\\\',$inp);
165
-        $out=str_replace('"','\"',$out);
166
-        $out=str_replace('?','\?',$out);
164
+        $out = str_replace('\\', '\\\\', $inp);
165
+        $out = str_replace('"', '\"', $out);
166
+        $out = str_replace('?', '\?', $out);
167 167
         $out = 'convert(cast(convert("'.$out.'" using latin1) as binary) using utf8)';
168 168
         return($out);
169 169
     }
Please login to merge, or discard this patch.
web/diag/diag.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 $admin = filter_input(INPUT_GET, 'admin', FILTER_VALIDATE_INT);
24 24
 $sp = filter_input(INPUT_GET, 'sp', FILTER_VALIDATE_INT);
25 25
 $givenRealm = htmlspecialchars(strip_tags(filter_input(INPUT_GET, 'realm')));
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             unset($q_el[$idx]);
36 36
             $q_r = preg_replace("/\?.*/", "", $_SERVER['REQUEST_URI']);
37 37
             if (count($q_el)) {
38
-                $q_r = $q_r . '?' . implode('&', $q_el);
38
+                $q_r = $q_r.'?'.implode('&', $q_el);
39 39
             }
40 40
             $_SERVER['REQUEST_URI'] = $q_r;
41 41
         }
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
     $auth->authenticate();
45 45
 }
46 46
 if (isset($_SESSION['admin_diag_auth'])) {
47
-   $admin =  1;
47
+   $admin = 1;
48 48
    unset($_SESSION['admin_diag_auth']);
49 49
 }
50 50
 $Gui = new \web\lib\user\Gui();
51 51
 $skinObject = new \web\lib\user\Skinjob($_REQUEST['skin'] ?? $_SESSION['skin'] ?? $fedskin[0] ?? \config\Master::APPEARANCE['skins'][0]);
52
-require "../skins/" . $skinObject->skin . "/diag/diag.php";
52
+require "../skins/".$skinObject->skin."/diag/diag.php";
53 53
 
54 54
 
Please login to merge, or discard this patch.
web/diag/magicTelepath.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(__DIR__)) . "/config/_config.php";
22
+require_once dirname(dirname(__DIR__))."/config/_config.php";
23 23
 $realm = htmlspecialchars(strip_tags(filter_input(INPUT_GET, 'realm')));
24
-$visited = htmlspecialchars(strip_tags(filter_input(INPUT_GET,'visited')));
25
-$nro = htmlspecialchars(strip_tags(filter_input(INPUT_GET,'nro')));
24
+$visited = htmlspecialchars(strip_tags(filter_input(INPUT_GET, 'visited')));
25
+$nro = htmlspecialchars(strip_tags(filter_input(INPUT_GET, 'nro')));
26 26
 \core\CAT::sessionStart();
27 27
 $languageObject = new core\common\Language();
28 28
 $languageObject->setTextDomain("diagonstics");
Please login to merge, or discard this patch.
web/diag/testTelepath.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(__DIR__)) . "/config/_config.php";
22
+require_once dirname(dirname(__DIR__))."/config/_config.php";
23 23
 
24 24
 $therealm = htmlspecialchars(strip_tags(filter_input(INPUT_GET, 'realm')));
25 25
 $thevisited = htmlspecialchars(strip_tags(filter_input(INPUT_GET, 'visited')));
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     $validator = new \web\lib\common\InputValidation();
36 36
     
37 37
     echo "<pre>";
38
-    echo "Testing " . $validatedRealm . " in " . $validator->string($thevisited);
38
+    echo "Testing ".$validatedRealm." in ".$validator->string($thevisited);
39 39
     print_r($telepath->magic());
40 40
     echo "</pre>";
41 41
 }
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
web/lib/admin/PageDecoration.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -73,17 +73,17 @@  discard block
 block discarded – undo
73 73
         $retval = "<div class='sidebar'><p>";
74 74
         $user = new \core\User($_SESSION['user']);
75 75
         if ($advancedControls) {
76
-            $retval .= "<strong>" . _("You are:") . "</strong> ".$_SESSION['name']
76
+            $retval .= "<strong>"._("You are:")."</strong> ".$_SESSION['name']
77 77
             ."<br/>
78 78
               <br/>";
79 79
             if ($user->isFederationAdmin()) {
80
-                $retval .= "<a href='" . \core\CAT::getRootUrlPath() . "/admin/overview_federation.php'>" . _("The NRO page") . "</a> ";
80
+                $retval .= "<a href='".\core\CAT::getRootUrlPath()."/admin/overview_federation.php'>"._("The NRO page")."</a> ";
81 81
 
82 82
             }
83
-            $retval .= "<a href='" . \core\CAT::getRootUrlPath() . "/admin/overview_user.php'>" . _("Go to your Profile page") . "</a> 
84
-              <a href='" . \core\CAT::getRootUrlPath() . "/admin/inc/logout.php'>" . _("Logout") . "</a> ";
83
+            $retval .= "<a href='".\core\CAT::getRootUrlPath()."/admin/overview_user.php'>"._("Go to your Profile page")."</a> 
84
+              <a href='" . \core\CAT::getRootUrlPath()."/admin/inc/logout.php'>"._("Logout")."</a> ";
85 85
         }
86
-        $retval .= "<a href='" . \core\CAT::getRootUrlPath() . "/'>" . _("Start page") . "</a>
86
+        $retval .= "<a href='".\core\CAT::getRootUrlPath()."/'>"._("Start page")."</a>
87 87
             </p>
88 88
         </div> <!-- sidebar -->";
89 89
         \core\common\Entity::outOfThePotatoes();
@@ -107,23 +107,23 @@  discard block
 block discarded – undo
107 107
                     <h1>$cap1</h1>
108 108
                 </div><!--header_captions-->
109 109
                 <div id='langselection' style='padding-top:20px; padding-".$this->start.":10px;'>
110
-                    <form action='$place' method='GET' accept-charset='UTF-8'>" . _("View this page in") . "&nbsp;
110
+                    <form action='$place' method='GET' accept-charset='UTF-8'>"._("View this page in")."&nbsp;
111 111
                         <select id='lang' name='lang' onchange='this.form.submit()'>";
112 112
 
113 113
         foreach (\config\Master::LANGUAGES as $lang => $getValue) {
114
-            $retval .= "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "" ) . " >" . $getValue['display'] . "</option> ";
114
+            $retval .= "<option value='$lang' ".(strtoupper($language) == strtoupper($lang) ? "selected" : "")." >".$getValue['display']."</option> ";
115 115
         }
116 116
         $retval .= "</select>";
117 117
 
118 118
         foreach ($_GET as $getVar => $getValue) {
119 119
             $filterValue = htmlspecialchars(strip_tags(filter_input(INPUT_GET, $getVar)));
120 120
             if ($getVar != "lang" && $getValue != "") {
121
-                $retval .= "<input type='hidden' name='" . htmlspecialchars($getVar) . "' value='" . htmlspecialchars($filterValue) . "'>";
121
+                $retval .= "<input type='hidden' name='".htmlspecialchars($getVar)."' value='".htmlspecialchars($filterValue)."'>";
122 122
             }
123 123
         }
124 124
         $retval .= "</form>
125 125
                 </div><!--langselection-->";
126
-        $logoUrl = \core\CAT::getRootUrlPath() . "/resources/images/consortium_logo.png";
126
+        $logoUrl = \core\CAT::getRootUrlPath()."/resources/images/consortium_logo.png";
127 127
         $retval .= "<div class='consortium_logo'>
128 128
                     <img id='test_locate' src='$logoUrl' alt='Consortium Logo'>
129 129
                 </div> <!-- consortium_logo -->
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
         if (isset(\config\Master::APPEARANCE['MOTD']) && \config\Master::APPEARANCE['MOTD'] != "") {
218 218
             $retval .= "<div id='header_MOTD' style='display:inline-block; padding-".$this->start.":20px;vertical-align:top;'>
219
-              <p class='MOTD'>" . \config\Master::APPEARANCE['MOTD'] . "</p>
219
+              <p class='MOTD'>" . \config\Master::APPEARANCE['MOTD']."</p>
220 220
               </div><!--header_MOTD-->";
221 221
         }
222 222
         $retval .= $this->sidebar($advancedControls);
@@ -242,9 +242,9 @@  discard block
 block discarded – undo
242 242
           <html xmlns='http://www.w3.org/1999/xhtml' lang='$ourlocale'".($this->langObject->rtl ? "dir='rtl'" : "").">
243 243
           <head lang='$ourlocale'>
244 244
           <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>";
245
-        $cssUrl = \core\CAT::getRootUrlPath() . "/resources/css/cat.css.php";
245
+        $cssUrl = \core\CAT::getRootUrlPath()."/resources/css/cat.css.php";
246 246
         $retval .= "<link rel='stylesheet' type='text/css' href='$cssUrl' />";
247
-        $retval .= "<title>" . htmlspecialchars($pagetitle) . "</title>";
247
+        $retval .= "<title>".htmlspecialchars($pagetitle)."</title>";
248 248
         return $retval;
249 249
     }
250 250
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
             // we may need to jump up one dir if we are either in admin/ or accountstatus/
259 259
             // (accountstatus courtesy of my good mood. It's userspace not admin space so
260 260
             // it shouldn't be using this function any more.)
261
-            $logoBase = \core\CAT::getRootUrlPath() . "/resources/images";
261
+            $logoBase = \core\CAT::getRootUrlPath()."/resources/images";
262 262
             return "<span id='logos'><img src='$logoBase/dante.png' alt='DANTE' style='height:23px;width:47px'/>
263 263
               <img src='$logoBase/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span>
264 264
               <span id='eu_text' style='text-align:right;'><a href='http://ec.europa.eu/dgs/connect/index_en.htm' style='text-decoration:none; vertical-align:top;'>European Commission Communications Networks, Content and Technology</a></span>";
Please login to merge, or discard this patch.
web/accountstatus/accountstatus.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  * @author Stefan Winter <[email protected]>
27 27
  * @package Core
28 28
  */
29
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
29
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
30 30
 
31 31
 $cleanToken = FALSE;
32 32
 $invitationObject = new core\SilverbulletInvitation("INVALID");
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
 $statusInfo = ["token" => $cleanToken,
76 76
     "invitation_object" => $invitationObject,
77
-    "OS" => $Gui->operatingSystem,];
77
+    "OS" => $Gui->operatingSystem, ];
78 78
 
79 79
 if ($profile !== NULL) {
80 80
     $attributes = $Gui->profileAttributes($profile->identifier);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 $caAndSerial = htmlspecialchars(strip_tags($caAndSerialUnfiltered));
89 89
 
90 90
 if ($action !== NULL && $action !== FALSE && $action === \web\lib\common\FormElements::BUTTON_DELETE && $caAndSerial !== NULL && $caAndSerial !== FALSE) {
91
-    $tuple = explode(':',$caAndSerial);
91
+    $tuple = explode(':', $caAndSerial);
92 92
     $ca_type = $tuple[0];
93 93
     $serial = $tuple[1];
94 94
     if ($statusInfo['invitation_object']->invitationTokenStatus != \core\SilverbulletInvitation::SB_TOKENSTATUS_INVALID) {
@@ -103,12 +103,12 @@  discard block
 block discarded – undo
103 103
                 print "//REVOKING\n";
104 104
                 $certObject = new \core\SilverbulletCertificate($serial, $ca_type);
105 105
                 $certObject->revokeCertificate();
106
-                header("Location: accountstatus.php?token=" . $statusInfo['token']);
106
+                header("Location: accountstatus.php?token=".$statusInfo['token']);
107 107
                 exit;
108 108
             }
109 109
         }
110 110
     }
111
-    header("Location: accountstatus.php?token=" . $statusInfo['token']);
111
+    header("Location: accountstatus.php?token=".$statusInfo['token']);
112 112
     exit;
113 113
 }
114 114
 
@@ -133,4 +133,4 @@  discard block
 block discarded – undo
133 133
 $skinObject = new \web\lib\user\Skinjob($_REQUEST['skin'] ?? $_SESSION['skin'] ?? $fedskin[0] ?? \config\Master::APPEARANCE['skins'][0]);
134 134
 
135 135
 // and now, serve actual data
136
-require "../skins/" . $skinObject->skin . "/accountstatus/accountstatus.php";
136
+require "../skins/".$skinObject->skin."/accountstatus/accountstatus.php";
Please login to merge, or discard this patch.