Test Failed
Push — master ( e1e902...4d7dc2 )
by Tomasz
03:15
created
web/admin/API.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@  discard block
 block discarded – undo
40 40
         $leftNum = (int) preg_replace($pat, $rep, $left);
41 41
         $rightNum = (int) preg_replace($pat, $rep, $right);
42 42
         return ($left != $leftNum && $right != $rightNum) ?
43
-                $leftNum - $rightNum :
44
-                strcmp($left, $right);
43
+                $leftNum - $rightNum : strcmp($left, $right);
45 44
     }
46 45
 
47 46
     
@@ -118,7 +117,7 @@  discard block
 block discarded – undo
118 117
             $therealm = "";
119 118
             $theanonid = "anonymous";
120 119
             $useAnon = FALSE;
121
-            $valuesFiltered = filter_input(INPUT_POST,'value', FILTER_SANITIZE_STRING, FILTER_REQUIRE_ARRAY);
120
+            $valuesFiltered = filter_input(INPUT_POST, 'value', FILTER_SANITIZE_STRING, FILTER_REQUIRE_ARRAY);
122 121
             foreach ($_POST['option'] as $optindex => $optname) {
123 122
                 switch ($optname) {
124 123
                     case "profile-api:anon":
Please login to merge, or discard this patch.
web/lib/admin/http/ValidateEmailAddress.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  * @author Zilvinas Vaira
11 11
  *
12 12
  */
13
-class ValidateEmailAddress extends AbstractAjaxCommand{
13
+class ValidateEmailAddress extends AbstractAjaxCommand {
14 14
 
15 15
     const COMMAND = 'validateemailaddress';
16 16
     const PARAM_ADDRESS = 'address';
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      * @param string $commandToken
21 21
      * @param DefaultContext $context
22 22
      */
23
-    public function __construct($commandToken, $context){
23
+    public function __construct($commandToken, $context) {
24 24
         parent::__construct($commandToken, $context);
25 25
     }
26 26
     
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
      * {@inheritDoc}
30 30
      * @see \web\lib\admin\http\AbstractCommand::execute()
31 31
      */
32
-    public function execute(){
33
-        if(isset($_POST[self::PARAM_ADDRESS])){
34
-            $address = $this->parseString(filter_input(INPUT_POST,self::PARAM_ADDRESS, FILTER_SANITIZE_STRING));
32
+    public function execute() {
33
+        if (isset($_POST[self::PARAM_ADDRESS])) {
34
+            $address = $this->parseString(filter_input(INPUT_POST, self::PARAM_ADDRESS, FILTER_SANITIZE_STRING));
35 35
             $result = OutsideComm::mailAddressValidSecure($address);
36 36
             $message = $this->chooseMessage($result, $address);
37 37
             $tokenTag = new Tag('email');
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      * @param string $address
51 51
      * @return string
52 52
      */
53
-    private function chooseMessage($result, $address){
53
+    private function chooseMessage($result, $address) {
54 54
         $errorMessage = sprintf(_("Email address '%s' validation failed. Sending is not possible!"), $address);
55 55
         $warningMessage = sprintf(_("The invitation token is possibly going over the internet without transport encryption and can be intercepted by random third parties for email '%s'! Please consider sending the invitation token via a more secure transport!"), $address);
56 56
         switch ($result) {
Please login to merge, or discard this patch.
core/common/Language.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,14 +84,14 @@
 block discarded – undo
84 84
             $langConverted[] = $hardSetLang;
85 85
         }
86 86
         if (!empty($_REQUEST['lang'])) {
87
-            $recoverLang = filter_input(INPUT_GET,'lang', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'lang', FILTER_SANITIZE_STRING);
87
+            $recoverLang = filter_input(INPUT_GET, 'lang', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'lang', FILTER_SANITIZE_STRING);
88 88
             $langConverted[] = $recoverLang;
89 89
         }
90 90
         if (!empty($_SESSION['language'])) {
91 91
             $langConverted[] = $_SESSION['language'];
92 92
         }
93 93
         if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
94
-            $langs = explode(",", filter_input(INPUT_SERVER,"HTTP_ACCEPT_LANGUAGE", FILTER_SANITIZE_STRING));
94
+            $langs = explode(",", filter_input(INPUT_SERVER, "HTTP_ACCEPT_LANGUAGE", FILTER_SANITIZE_STRING));
95 95
             foreach ($langs as $lang) {
96 96
                 $result = [];
97 97
                 preg_match("/(.*);+.*/", $lang, $result);
Please login to merge, or discard this patch.
web/diag/radius_tests.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 function disp_name($eap) {
29 29
     $displayName = EAP::eapDisplayName($eap);
30
-    return $displayName['OUTER'] . ( $displayName['INNER'] != '' ? '-' . $displayName['INNER'] : '');
30
+    return $displayName['OUTER'] . ($displayName['INNER'] != '' ? '-' . $displayName['INNER'] : '');
31 31
 }
32 32
 
33 33
 if (!isset($_REQUEST['test_type']) || !$_REQUEST['test_type']) {
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     $testsuite = new \core\diag\RADIUSTests($check_realm, $my_profile->getRealmCheckOuterUsername(), \core\common\EAP::multiConversion($my_profile->getEapMethodsinOrderOfPreference(1)), $my_profile->getCollapsedAttributes()['eap:server_name'], $my_profile->getCollapsedAttributes()['eap:ca_file']);
51 51
 } else {
52 52
     $my_profile = NULL;
53
-    $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm);
53
+    $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm);
54 54
 }
55 55
 
56 56
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     // contains port number; needs to be redacted for filter_var to work
67 67
     // in any case, it's a printable string, so filter it initially
68 68
     
69
-    $filteredHost = filter_input(INPUT_GET,'src', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST,'src', FILTER_SANITIZE_STRING);
69
+    $filteredHost = filter_input(INPUT_GET, 'src', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'src', FILTER_SANITIZE_STRING);
70 70
     $hostonly1 = preg_replace('/:[0-9]*$/', "", $filteredHost);
71 71
     $hostonly2 = preg_replace('/^\[/', "", $hostonly1);
72 72
     $hostonly3 = preg_replace('/\]$/', "", $hostonly2);
@@ -296,12 +296,12 @@  discard block
 block discarded – undo
296 296
         $returnarray['time_millisec'] = sprintf("%d", $testsuite->UDP_reachability_result[$host]['time_millisec']);
297 297
 
298 298
         if (preg_match('/verify error:num=19/', implode($opensslbabble))) {
299
-            $printedres .= "<tr><td>"._("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!") . $measure ."</td></tr>";
299
+            $printedres .= "<tr><td>" . _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!") . $measure . "</td></tr>";
300 300
             $my_ip_addrs[$key]["status"] = "FAILED";
301 301
             $goterror = 1;
302 302
         }
303 303
         if (preg_match('/verify return:1/', implode($opensslbabble))) {
304
-            $printedres .= "<tr><td>"._("Completed.") . $measure . "</td></tr>";
304
+            $printedres .= "<tr><td>" . _("Completed.") . $measure . "</td></tr>";
305 305
             $printedres .= "<tr><td></td><td><div class=\"more\">";
306 306
             $my_ip_addrs[$key]["status"] = "OK";
307 307
             $servercertRaw = implode("\n", $opensslbabble);
Please login to merge, or discard this patch.
web/accountstatus/accountstatus.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 $cleanToken = FALSE;
23 23
 $tokenStatus = ["status" => \core\ProfileSilverbullet::SB_TOKENSTATUS_INVALID,
24
-    "cert_status" => [],];
24
+    "cert_status" => [], ];
25 25
 $profile = NULL;
26 26
 $idp = NULL;
27 27
 $fed = NULL;
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         // it can be VALID (exists and not redeemed, EXPIRED, REDEEMED or INVALID (non existent)
39 39
         $tokenStatus = \core\ProfileSilverbullet::tokenStatus($cleanToken);
40 40
     }
41
-} elseif (isset($_SERVER['SSL_CLIENT_SAN_Email']) || isset($_SERVER['SSL_CLIENT_SAN_Email_0']) ) {
41
+} elseif (isset($_SERVER['SSL_CLIENT_SAN_Email']) || isset($_SERVER['SSL_CLIENT_SAN_Email_0'])) {
42 42
     // maybe the user authenticated with his client cert? Then pick any of his
43 43
     // tokens to go on
44 44
     $certname = $_SERVER['SSL_CLIENT_SAN_Email'] ?? $_SERVER['SSL_CLIENT_SAN_Email_0'];
Please login to merge, or discard this patch.
core/IdP.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $this->entityOptionTable = "institution_option";
64 64
         $this->entityIdColumn = "institution_id";
65 65
         if (!is_numeric($instId)) {
66
-            throw new Exception("An ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_inst']." is identified by an integer index!");
66
+            throw new Exception("An " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_inst'] . " is identified by an integer index!");
67 67
         }
68 68
         $this->identifier = (int) $instId;
69 69
 
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
             $alreadyUsed = $this->databaseHandle->exec("SELECT DISTINCT external_db_id FROM institution WHERE external_db_id = ? AND external_db_syncstate = ?", "si", $identifier, $syncState);
318 318
 
319 319
             if (mysqli_num_rows($alreadyUsed) == 0) {
320
-                $this->databaseHandle->exec("UPDATE institution SET external_db_id = ?, external_db_syncstate = ? WHERE inst_id = ?", "sii", $identifier, $syncState, $this->identifier );
320
+                $this->databaseHandle->exec("UPDATE institution SET external_db_id = ?, external_db_syncstate = ? WHERE inst_id = ?", "sii", $identifier, $syncState, $this->identifier);
321 321
             }
322 322
         }
323 323
     }
Please login to merge, or discard this patch.
web/lib/admin/domain/SilverbulletCertificate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -265,7 +265,7 @@
 block discarded – undo
265 265
             $query = sprintf("SELECT %s FROM `%s` WHERE `%s`=? AND `%s`=? ORDER BY `%s`, `%s` DESC", self::COLUMN_NAME_LIST, self::TABLE, self::SILVERBULLETUSERID, $searchAttribute->key, self::REVOCATION_STATUS, self::EXPIRY);
266 266
             $types = $userType . $attrType;
267 267
             $result = $databaseHandle->exec($query, $types, $userValue, $attrValue);
268
-        } else if($silverbulletUser != null) {
268
+        } else if ($silverbulletUser != null) {
269 269
             $userId = $silverbulletUser->getAttribute(self::ID);
270 270
             $userType = $userId->getType();
271 271
             $userValue = $userId->value;
Please login to merge, or discard this patch.
devices/ms/WindowsCommon.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
     public function __construct() {
92 92
         parent::__construct();
93
-        $this->useGeantLink = (isset($this->options['args']) && $this->options['args'] == 'gl' ) ? 1 : 0;
93
+        $this->useGeantLink = (isset($this->options['args']) && $this->options['args'] == 'gl') ? 1 : 0;
94 94
     }
95 95
 
96 96
     protected function prepareInstallerLang() {
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         // not EAP-TLS
127 127
         $out .= sprintf(_("In order to connect to the network you will need an account from your %s. You should consult the support page to find out how this account can be obtained. It is very likely that your account is already activated."), $this->nomenclature_inst);
128 128
 
129
-        if (! $this->useGeantLink && ( $this->selectedEap == \core\common\EAP::EAPTYPE_TTLS_MSCHAP2 || $this->selectedEap == \core\common\EAP::EAPTYPE_TTLS_PAP )) {
129
+        if (!$this->useGeantLink && ($this->selectedEap == \core\common\EAP::EAPTYPE_TTLS_MSCHAP2 || $this->selectedEap == \core\common\EAP::EAPTYPE_TTLS_PAP)) {
130 130
             $out .= "<p>";
131 131
             $out .= _("When you are connecting to the network for the first time, Windows will pop up a login box, where you should enter your user name and password. This information will be saved so that you will reconnect to the network automatically each time you are in the range.");
132 132
             if ($ssidCount > 1) {
@@ -180,10 +180,10 @@  discard block
 block discarded – undo
180 180
         $this->background['freeHeight'] = $bgImageSize['height'] - $freeTop - $freeBottom;
181 181
 
182 182
         if ($useFederationLogo && $fedLogo != NULL) {
183
-            $logosToPlace[] = $this->scaleLogo($fedLogo[0]['name'],$maxSize);
183
+            $logosToPlace[] = $this->scaleLogo($fedLogo[0]['name'], $maxSize);
184 184
         }
185 185
         if ($logos != NULL) {
186
-            $logosToPlace[] = $this->scaleLogo($logos[0]['name'],$maxSize);
186
+            $logosToPlace[] = $this->scaleLogo($logos[0]['name'], $maxSize);
187 187
         }
188 188
 
189 189
         $logoCount = count($logosToPlace);
Please login to merge, or discard this patch.