Passed
Push — master ( c57d81...3d7ab7 )
by Maja
06:49
created
web/skins/example/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  */
10 10
 ?>
11 11
 <h1>Example Skin (main user frontpage)</h1>
12
-<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","consortium_logo.png");?>"/>
12
+<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "consortium_logo.png"); ?>"/>
13 13
 <p>This skin is much more sober and less bloated than the default one. As it happens, it also doesn't do anything.</p>
14 14
 <p>But at least it goes to show that it's possible to include custom images/CSS/external software using findResourceUrl(..., $filename):
15
-<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","custom.png");?>"/>
15
+<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "custom.png"); ?>"/>
Please login to merge, or discard this patch.
core/Psr4Autoloader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,10 +97,10 @@
 block discarded – undo
97 97
     public function addNamespace($prefix, $base_dir, $prepend = false)
98 98
     {
99 99
         // normalize namespace prefix
100
-        $prefix = trim($prefix, '\\') . '\\';
100
+        $prefix = trim($prefix, '\\').'\\';
101 101
 
102 102
         // normalize the base directory with a trailing separator
103
-        $base_dir = rtrim($base_dir, DIRECTORY_SEPARATOR) . '/';
103
+        $base_dir = rtrim($base_dir, DIRECTORY_SEPARATOR).'/';
104 104
 
105 105
         // initialize the namespace prefix array
106 106
         if (isset($this->prefixes[$prefix]) === false) {
Please login to merge, or discard this patch.
core/ProfileRADIUS.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
 
113 113
         $attributesLowLevel = array_merge($this->deviceLevelAttributes, $this->eapLevelAttributes);
114 114
 
115
-        $this->loggerInstance->debug(5, "Device-Level Attributes: " . print_r($this->deviceLevelAttributes, true));
116
-        $this->loggerInstance->debug(5, "EAP-Level Attributes: " . print_r($this->eapLevelAttributes, true));
117
-        $this->loggerInstance->debug(5, "All low-Level Attributes: " . print_r($attributesLowLevel, true));
115
+        $this->loggerInstance->debug(5, "Device-Level Attributes: ".print_r($this->deviceLevelAttributes, true));
116
+        $this->loggerInstance->debug(5, "EAP-Level Attributes: ".print_r($this->eapLevelAttributes, true));
117
+        $this->loggerInstance->debug(5, "All low-Level Attributes: ".print_r($attributesLowLevel, true));
118 118
 
119 119
         // now fetch and merge profile-level attributes if not already set on deeper level
120 120
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             }
134 134
         }
135 135
 
136
-        $this->loggerInstance->debug(5, "Merged Attributes: " . print_r($attributesLowLevel, true));
136
+        $this->loggerInstance->debug(5, "Merged Attributes: ".print_r($attributesLowLevel, true));
137 137
 
138 138
         // now, fetch and merge IdP-wide attributes
139 139
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                 "row" => $attributeQuery->row,
189 189
                 "flag" => $optinfo['flag'],
190 190
                 "device" => ($devicesOrEAPMethods == "DEVICES" ? $attributeQuery->deviceormethod : NULL),
191
-                "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep() )];
191
+                "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep())];
192 192
         }
193 193
         return $temparray;
194 194
     }
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
      * @return void
290 290
      */
291 291
     public function setAnonymousIDSupport($shallwe) {
292
-        $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier");
292
+        $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier");
293 293
     }
294 294
 
295 295
     /** Toggle special username for realm checks
@@ -299,8 +299,8 @@  discard block
 block discarded – undo
299 299
      * @return void
300 300
      */
301 301
     public function setRealmCheckUser($shallwe, $localpart = NULL) {
302
-        $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = " . ($shallwe === true ? "1" : "0") .
303
-                ( $localpart !== NULL ? ", checkuser_value = '$localpart' " : "") .
302
+        $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = ".($shallwe === true ? "1" : "0").
303
+                ($localpart !== NULL ? ", checkuser_value = '$localpart' " : "").
304 304
                 " WHERE profile_id = $this->identifier");
305 305
     }
306 306
 
@@ -312,8 +312,8 @@  discard block
 block discarded – undo
312 312
      * @return void
313 313
      */
314 314
     public function setInputVerificationPreference($verify, $hint) {
315
-        $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = " . ($verify === true ? "1" : "0") .
316
-                ", hint_userinput_suffix = " . ($hint === true ? "1" : "0") .
315
+        $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = ".($verify === true ? "1" : "0").
316
+                ", hint_userinput_suffix = ".($hint === true ? "1" : "0").
317 317
                 " WHERE profile_id = $this->identifier");
318 318
     }
319 319
 
Please login to merge, or discard this patch.
core/common/X509.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
      */
84 84
     public function der2pem($derData) {
85 85
         $pem = chunk_split(base64_encode($derData), 64, "\n");
86
-        $pem = "-----BEGIN CERTIFICATE-----\n" . $pem . "-----END CERTIFICATE-----\n";
86
+        $pem = "-----BEGIN CERTIFICATE-----\n".$pem."-----END CERTIFICATE-----\n";
87 87
         return $pem;
88 88
     }
89 89
 
Please login to merge, or discard this patch.
core/common/EAP.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,8 +165,8 @@
 block discarded – undo
165 165
             $key = array_search($eapType, EAP::EAPTYPES_CONVERSION);
166 166
             if ($key !== FALSE) {
167 167
                 // add a type cast to int to make Scrutinizer realise that the key found is always an integer
168
-                $this->intRep = (int)$key; // array index is always an integer
169
-                $this->arrayRep = EAP::EAPTYPES_CONVERSION[(int)$key];
168
+                $this->intRep = (int) $key; // array index is always an integer
169
+                $this->arrayRep = EAP::EAPTYPES_CONVERSION[(int) $key];
170 170
                 return;
171 171
             }
172 172
         }
Please login to merge, or discard this patch.
core/IdPlist.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         foreach ($idps as $idp) {
38 38
             $idpTitle[$idp['entityID']] = $idp['title'];
39 39
             $d = self::getIdpDistance($idp, $here);
40
-            $resultSet[$idp['entityID']] = $d . " " . $idp['title'];
40
+            $resultSet[$idp['entityID']] = $d." ".$idp['title'];
41 41
         }
42 42
         asort($resultSet);
43 43
         $outarray = [];
Please login to merge, or discard this patch.
utils/cleanup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,6 +24,6 @@
 block discarded – undo
24 24
 /**
25 25
  * This script deletes obsolete directories from installer cache and siverbullet directory
26 26
  */
27
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
27
+require_once dirname(dirname(__FILE__))."/config/_config.php";
28 28
 
29 29
 web\lib\admin\Maintenance::deleteObsoleteTempDirs();
Please login to merge, or discard this patch.
utils/ocsp_update.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
  * It works on two CAs, the RSA and ECDSA variant. There is a separate temp
29 29
  * subdir for both ( temp_ocsp_RSA and temp_ocsp_ECDSA ).
30 30
  */
31
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
32
-if (file_exists(__DIR__ . "/semaphore")) {
31
+require_once dirname(dirname(__FILE__))."/config/_config.php";
32
+if (file_exists(__DIR__."/semaphore")) {
33 33
     exit(1); // another instance is still busy doing stuff. Don't interfere.
34 34
 }
35
-file_put_contents(__DIR__ . "/semaphore", "BUSY");
35
+file_put_contents(__DIR__."/semaphore", "BUSY");
36 36
 $dbLink = \core\DBConnection::handle("INST");
37 37
 $allSerials = $dbLink->exec("SELECT serial_number, ca_type FROM silverbullet_certificate WHERE serial_number IS NOT NULL AND expiry > NOW() AND OCSP_timestamp < DATE_SUB(NOW(), INTERVAL 1 WEEK)");
38 38
 // SELECT query -> always returns a mysql_result, not boolean
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 #    echo "Writing OCSP statement for serial number $statementRow->serial_number\n";
59 59
     $filename = strtoupper(dechex($statementRow->serial_number)).".der";
60 60
     if (strlen($filename) % 2 == 1) {
61
-        $filename = "0" . $filename;
61
+        $filename = "0".$filename;
62 62
     }
63 63
     file_put_contents($tempdirBase."_".$statementRow->ca_type."/".$filename, $statementRow->OCSP);
64 64
 }
65
-unlink(__DIR__ . "/semaphore");
66 65
\ No newline at end of file
66
+unlink(__DIR__."/semaphore");
67 67
\ No newline at end of file
Please login to merge, or discard this patch.
web/basic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
  * @package Core
27 27
  */
28 28
 
29
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
29
+require_once dirname(dirname(__FILE__))."/config/_config.php";
30 30
 
31 31
 $validator = new \web\lib\common\InputValidation();
32 32
 
Please login to merge, or discard this patch.