Passed
Push — release_2_1 ( 007f3d...3ea6a4 )
by Tomasz
09:51
created
web/lib/user/Skinjob.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -95,17 +95,17 @@
 block discarded – undo
95 95
         }
96 96
 
97 97
         // does the file exist in the current skin's directory? Has precedence
98
-        if ($submodule !== '' && file_exists(__DIR__ . "/../../skins/" . $this->skin . "/" . $submodule . $path . $filename)) {
99
-            $extrapath = "/skins/" . $this->skin . "/" . $submodule;
98
+        if ($submodule !== '' && file_exists(__DIR__."/../../skins/".$this->skin."/".$submodule.$path.$filename)) {
99
+            $extrapath = "/skins/".$this->skin."/".$submodule;
100 100
         }
101
-        elseif (file_exists(__DIR__ . "/../../skins/" . $this->skin . $path . $filename)) {
102
-            $extrapath = "/skins/" . $this->skin;
103
-        } elseif (file_exists(__DIR__ . "/../../" . $path . $filename)) {
101
+        elseif (file_exists(__DIR__."/../../skins/".$this->skin.$path.$filename)) {
102
+            $extrapath = "/skins/".$this->skin;
103
+        } elseif (file_exists(__DIR__."/../../".$path.$filename)) {
104 104
             $extrapath = "";
105 105
         } else {
106 106
             return FALSE;
107 107
         }       
108
-        return htmlspecialchars(\core\CAT::getRootUrlPath() . $extrapath . $path . $filename, ENT_QUOTES);
108
+        return htmlspecialchars(\core\CAT::getRootUrlPath().$extrapath.$path.$filename, ENT_QUOTES);
109 109
     }
110 110
 
111 111
 }
Please login to merge, or discard this patch.
web/lib/admin/Maintenance.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public static function deleteObsoleteTempDirs() {
36 36
         $downloadsDirs = [
37
-            'site_installers' => dirname(dirname(dirname(dirname(__FILE__)))) . "/var/installer_cache",
38
-            'silverbullet' => dirname(dirname(dirname(dirname(__FILE__)))) . "/var/silverbullet"
37
+            'site_installers' => dirname(dirname(dirname(dirname(__FILE__))))."/var/installer_cache",
38
+            'silverbullet' => dirname(dirname(dirname(dirname(__FILE__))))."/var/silverbullet"
39 39
         ];
40 40
         $tm = time();
41 41
         $i = 0;
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
                     if ($entry === '.' || $entry === '..' || $entry === '.gitignore') {
55 55
                         continue;
56 56
                     }
57
-                    $ftime = $tm - filemtime($downloads . '/' . $entry);
57
+                    $ftime = $tm - filemtime($downloads.'/'.$entry);
58 58
                     if ($ftime < 3600) {
59 59
                         continue;
60 60
                     }
61 61
                     if (isset($Cache[$entry])) {
62 62
                         continue;
63 63
                     }
64
-                    \core\common\Entity::rrmdir($downloads . '/' . $entry);
64
+                    \core\common\Entity::rrmdir($downloads.'/'.$entry);
65 65
                     $i = $i + 1;
66 66
                     print "$entry\n";
67 67
                 }
Please login to merge, or discard this patch.
web/copyright.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
  * @author Stefan Winter <[email protected]>
26 26
  * @package Core
27 27
  */
28
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
28
+require_once dirname(dirname(__FILE__))."/config/_config.php";
29 29
 
30 30
 $Gui = new \web\lib\user\Gui();
31 31
 // ... unless overwritten by direct GET/POST parameter in the request or a SESSION setting
Please login to merge, or discard this patch.
web/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
  * @author Stefan Winter <[email protected]>
26 26
  * @package Core
27 27
  */
28
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
28
+require_once dirname(dirname(__FILE__))."/config/_config.php";
29 29
 
30 30
 $Gui = new \web\lib\user\Gui();
31 31
 // ... unless overwritten by direct GET/POST parameter in the request or a SESSION setting
Please login to merge, or discard this patch.
devices/test_module/DeviceTestModule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,8 +138,8 @@
 block discarded – undo
138 138
      */
139 139
     private function zipInstaller() {
140 140
         // one can always access $this->attributes to check things
141
-        $fileName = $this->installerBasename . '.zip';
142
-        $output = system('zip -q ' . $fileName . ' *');
141
+        $fileName = $this->installerBasename.'.zip';
142
+        $output = system('zip -q '.$fileName.' *');
143 143
         if ($output === FALSE) {
144 144
             $this->loggerInstance->debug(2, "unable to zip the installer\n");
145 145
         }
Please login to merge, or discard this patch.
devices/redirect_dev/DeviceRedirectDev.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     final public function __construct() {
31 31
         parent::__construct();
32 32
       $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_NONE]);
33
-      $this->loggerInstance->debug(4,"RedirectEx called");
33
+      $this->loggerInstance->debug(4, "RedirectEx called");
34 34
     }
35 35
     
36 36
     /**
Please login to merge, or discard this patch.
core/UserManagement.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                 } else {
147 147
                     $this->databaseHandle->exec("INSERT INTO ownership (user_id, institution_id, blesslevel, orig_mail) VALUES(?, ?, ?, ?)", "siss", $owner, $catId, $level, $destMail);
148 148
                 }
149
-                $this->loggerInstance->writeAudit((string) $owner, "OWN", "IdP " . $invitationDetails->cat_institution_id . " - added user as owner");
149
+                $this->loggerInstance->writeAudit((string) $owner, "OWN", "IdP ".$invitationDetails->cat_institution_id." - added user as owner");
150 150
                 common\Entity::outOfThePotatoes();
151 151
                 return new IdP($invitationDetails->cat_institution_id);
152 152
             }
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
                 $idp = new IdP($fed->newIdP($invitationDetails->invite_fortype, $owner, $invitationDetails->invite_issuer_level, $invitationDetails->invite_dest_mail, $bestnameguess));
169 169
             }
170 170
             $idp->addAttribute("general:instname", 'C', $bestnameguess);
171
-            $this->loggerInstance->writeAudit($owner, "NEW", "IdP " . $idp->identifier . " - created from invitation");
171
+            $this->loggerInstance->writeAudit($owner, "NEW", "IdP ".$idp->identifier." - created from invitation");
172 172
 
173 173
             // in case we have more admins in the queue which were invited to 
174 174
             // administer the same inst but haven't redeemed their invitations 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
                              WHERE invite_created >= TIMESTAMPADD(DAY, -1, NOW()) AND used = 0 AND name = ? AND country = ? AND ( cat_institution_id IS NULL OR external_db_uniquehandle IS NULL ) ", "ss", $invitationDetails->name, $invitationDetails->country);
183 183
             // SELECT -> resource, no boolean
184 184
             while ($pendingDetail = mysqli_fetch_object(/** @scrutinizer ignore-type */ $otherPending)) {
185
-                $this->databaseHandle->exec("UPDATE invitations SET cat_institution_id = " . $idp->identifier . " WHERE id = " . $pendingDetail->id);
185
+                $this->databaseHandle->exec("UPDATE invitations SET cat_institution_id = ".$idp->identifier." WHERE id = ".$pendingDetail->id);
186 186
             }
187 187
         
188 188
             common\Entity::outOfThePotatoes();
@@ -281,9 +281,9 @@  discard block
 block discarded – undo
281 281
         $retval = [];
282 282
         $invitations = $this->databaseHandle->exec("SELECT cat_institution_id, country, name, invite_issuer_level, invite_dest_mail, invite_token , TIMESTAMPADD(DAY, 1, invite_created) as expiry
283 283
                                         FROM invitations 
284
-                                        WHERE cat_institution_id " . ( $idpIdentifier != 0 ? "= $idpIdentifier" : "IS NULL") . " AND invite_created >= TIMESTAMPADD(DAY, -1, NOW()) AND used = 0");
284
+                                        WHERE cat_institution_id " . ($idpIdentifier != 0 ? "= $idpIdentifier" : "IS NULL")." AND invite_created >= TIMESTAMPADD(DAY, -1, NOW()) AND used = 0");
285 285
         // SELECT -> resource, not boolean
286
-        $this->loggerInstance->debug(4, "Retrieving pending invitations for " . ($idpIdentifier != 0 ? "IdP $idpIdentifier" : "IdPs awaiting initial creation" ) . ".\n");
286
+        $this->loggerInstance->debug(4, "Retrieving pending invitations for ".($idpIdentifier != 0 ? "IdP $idpIdentifier" : "IdPs awaiting initial creation").".\n");
287 287
         while ($invitationQuery = mysqli_fetch_object(/** @scrutinizer ignore-type */ $invitations)) {
288 288
             $retval[] = ["country" => $invitationQuery->country, "name" => $invitationQuery->name, "mail" => $invitationQuery->invite_dest_mail, "token" => $invitationQuery->invite_token, "expiry" => $invitationQuery->expiry];
289 289
         }
Please login to merge, or discard this patch.
core/diag/RFC5997Tests.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -88,24 +88,24 @@  discard block
 block discarded – undo
88 88
         $reqAuthenticator = random_bytes(16);
89 89
         $packetIdentifier = random_bytes(1);
90 90
         // construct Status-Server packet
91
-        $prePacket = RFC5997Tests::PACKET_TYPE_STATUS_SERVER .
92
-                $packetIdentifier .
93
-                RFC5997Tests::PACKET_LENGTH .
94
-                $reqAuthenticator .
95
-                RFC5997Tests::ATTRIBUTE_NAS_IDENTIFIER .
96
-                RFC5997Tests::LENGTH_NAS_IDENTIFIER .
91
+        $prePacket = RFC5997Tests::PACKET_TYPE_STATUS_SERVER.
92
+                $packetIdentifier.
93
+                RFC5997Tests::PACKET_LENGTH.
94
+                $reqAuthenticator.
95
+                RFC5997Tests::ATTRIBUTE_NAS_IDENTIFIER.
96
+                RFC5997Tests::LENGTH_NAS_IDENTIFIER.
97 97
                 RFC5997Tests::VALUE_NAS_IDENTIFIER;
98
-        $sigPacket = $prePacket .
99
-                RFC5997Tests::ATTRIBUTE_MESSAGE_AUTHENTICATOR .
100
-                RFC5997Tests::LENGTH_MESSAGE_AUTHENTICATOR .
98
+        $sigPacket = $prePacket.
99
+                RFC5997Tests::ATTRIBUTE_MESSAGE_AUTHENTICATOR.
100
+                RFC5997Tests::LENGTH_MESSAGE_AUTHENTICATOR.
101 101
                 "\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0";
102
-        $authPacket = $prePacket .
103
-                RFC5997Tests::ATTRIBUTE_MESSAGE_AUTHENTICATOR .
104
-                RFC5997Tests::LENGTH_MESSAGE_AUTHENTICATOR .
102
+        $authPacket = $prePacket.
103
+                RFC5997Tests::ATTRIBUTE_MESSAGE_AUTHENTICATOR.
104
+                RFC5997Tests::LENGTH_MESSAGE_AUTHENTICATOR.
105 105
                 hash_hmac("md5", $sigPacket, $this->secret, TRUE);
106 106
         $connectErrorNumber = 0;
107 107
         $connectErrorString = "";
108
-        $netHandle = fsockopen("udp://" . $this->ipAddr, $this->port, $connectErrorNumber, $connectErrorString, RFC5997Tests::CONNECTION_TIMEOUT);
108
+        $netHandle = fsockopen("udp://".$this->ipAddr, $this->port, $connectErrorNumber, $connectErrorString, RFC5997Tests::CONNECTION_TIMEOUT);
109 109
         if ($netHandle === FALSE) {
110 110
             throw new Exception("Unable to establish UDP socket resource. Error number was $connectErrorNumber, '$connectErrorString'");
111 111
         }
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
             return AbstractTest::RETVAL_INVALID;
124 124
         }
125 125
         // check the response authenticator to prevent spoofing.
126
-        $sigResponse = RFC5997Tests::PACKET_TYPE_ACCESS_ACCEPT .
127
-                $packetIdentifier .
128
-                $read[2] . $read[3] .
129
-                $reqAuthenticator .
130
-                substr($read, 20) .
126
+        $sigResponse = RFC5997Tests::PACKET_TYPE_ACCESS_ACCEPT.
127
+                $packetIdentifier.
128
+                $read[2].$read[3].
129
+                $reqAuthenticator.
130
+                substr($read, 20).
131 131
                 $this->secret;
132 132
         $expected = hash("md5", $sigResponse, TRUE);
133 133
         if ($expected != substr($read, 4, 16)) {
Please login to merge, or discard this patch.
web/diag/processSociopath.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
 \core\CAT::sessionStart();
24 24
 $loggerInstance = new \core\common\Logging();
25 25
 $loggerInstance->debug(4, "Sociopath test\n");
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         return NULL;
34 34
     }
35 35
     $loggerInstance->debug(4, $_SESSION['EVIDENCE']['QUESTIONSASKED']);
36
-    $loggerInstance->debug(4, "\nAnswer question " . $QNUM . "\n");
36
+    $loggerInstance->debug(4, "\nAnswer question ".$QNUM."\n");
37 37
     switch ($answer) {
38 38
         case 1:
39 39
             $loggerInstance->debug(4, "Revaluate with FALSE");
Please login to merge, or discard this patch.