Passed
Push — master ( 9af84e...7cf688 )
by Tomasz
04:22
created
web/lib/admin/OptionDisplay.php 2 patches
Doc Comments   +11 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,6 +142,9 @@  discard block
 block discarded – undo
142 142
         return $retval;
143 143
     }
144 144
 
145
+    /**
146
+     * @param integer $rowid
147
+     */
145 148
     private function selectElement($rowid, $list) {
146 149
         $jsmagic = "onchange='
147 150
                                if (/#ML#/.test(document.getElementById(\"option-S" . $rowid . "-select\").value)) {
@@ -183,6 +186,10 @@  discard block
 block discarded – undo
183 186
         return ["TEXT" => $retval, "ACTIVE" => $activelisttype];
184 187
     }
185 188
 
189
+    /**
190
+     * @param integer $rowid
191
+     * @param boolean $makeVisible
192
+     */
186 193
     private function selectLanguage($rowid, $makeVisible) {
187 194
         $retval = "<select style='display:" . ($makeVisible ? "block" : "none") . "' name='value[S$rowid-lang]' id='S" . $rowid . "-input-langselect'>
188 195
             <option value='' name='select_language' selected>" . _("select language") . "</option>
@@ -203,6 +210,9 @@  discard block
 block discarded – undo
203 210
         \core\Options::TYPECODE_TEXT => ["html" => "textarea cols='30' rows='3'", "tail" => '></textarea'],
204 211
     ];
205 212
 
213
+    /**
214
+     * @param integer $rowid
215
+     */
206 216
     private function inputFields($rowid, $activetype) {
207 217
         $retval = "";
208 218
         foreach (OptionDisplay::HTML_DATATYPE_TEXTS as $key => $type) {
@@ -235,7 +245,7 @@  discard block
 block discarded – undo
235 245
      * @param int $rowid the HTML field base name of the option to be displayed
236 246
      * @param string $optionName the name of the option to display
237 247
      * @param string $optionValue the value of the option to display
238
-     * @param mixed $optionLang the language of the option to display
248
+     * @param null|string $optionLang the language of the option to display
239 249
      * @return string HTML code
240 250
      * @throws Exception
241 251
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
         $optioninfo = \core\Options::instance();
106 106
 
107
-        if (is_array($prepopulate) && ( count($prepopulate) > 1 || $class == "device-specific" || $class == "eap-specific")) { // editing... fill with values
107
+        if (is_array($prepopulate) && (count($prepopulate) > 1 || $class == "device-specific" || $class == "eap-specific")) { // editing... fill with values
108 108
             foreach ($prepopulate as $option) {
109 109
                 if (preg_match("/$class:/", $option['name']) && !preg_match("/(user:fedadmin)/", $option['name'])) {
110 110
                     $optiontypearray = $optioninfo->optionType($option['name']);
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
                 $retval .= "<input readonly style='display:none' type='text' name='value[S$rowid-" . \core\Options::TYPECODE_TEXT . "]' id='S$rowid-input-text' value='$optionValue'>$link";
273 273
                 break;
274 274
             case \core\Options::TYPECODE_FILE:
275
-                $retval .= "<input readonly type='text' name='value[S$rowid-".\core\Options::TYPECODE_STRING."]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>";
275
+                $retval .= "<input readonly type='text' name='value[S$rowid-" . \core\Options::TYPECODE_STRING . "]' id='S" . $rowid . "-input-string' style='display:none' value='" . urlencode($optionValue) . "'>";
276 276
                 $uiElements = new UIElements();
277 277
                 switch ($optionName) {
278 278
                     case "eap:ca_file":
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
         $retval .= "
341 341
 
342 342
        <td>
343
-          <button type='button' class='delete' onclick='deleteOption(" . ( $prefillValue !== NULL && $item == "general:geo_coordinates" ? $this->allLocationCount : 0 ) . ",\"option-S" . $rowid . "\")'>-</button>
343
+          <button type='button' class='delete' onclick='deleteOption(" . ($prefillValue !== NULL && $item == "general:geo_coordinates" ? $this->allLocationCount : 0) . ",\"option-S" . $rowid . "\")'>-</button>
344 344
        </td>
345 345
     </tr>";
346 346
         return $retval;
Please login to merge, or discard this patch.
devices/xml/Device_XML.php 3 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -287,6 +287,9 @@  discard block
 block discarded – undo
287 287
         }
288 288
     }
289 289
 
290
+    /**
291
+     * @param Type $eaptype
292
+     */
290 293
     private function setServerSideCredentials($eaptype) {
291 294
         $attr = $this->attributes;
292 295
         $serversidecredential = new ServerSideCredential();
@@ -331,6 +334,9 @@  discard block
 block discarded – undo
331 334
         return($clientsidecredential);
332 335
     }
333 336
     
337
+    /**
338
+     * @param Type $eaptype
339
+     */
334 340
     private function setEapMethod($eaptype) {
335 341
         $attr = $this->attributes;
336 342
         $eapmethod = new EAPMethod();
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -350,7 +350,7 @@
 block discarded – undo
350 350
     }
351 351
     
352 352
     private function getAuthMethod($eap) {
353
- //       $attr = $this->attributes;
353
+    //       $attr = $this->attributes;
354 354
         $authmethod = new AuthenticationMethod();
355 355
         $eapParams = $this->getAuthenticationMethodParams($eap);
356 356
         $eaptype = new Type();
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * @package ModuleWriting
20 20
  */
21 21
 namespace devices\xml;
22
-require_once(dirname(__FILE__).'/XML.inc.php');
22
+require_once(dirname(__FILE__) . '/XML.inc.php');
23 23
 
24 24
 /**
25 25
  * This class implements full functionality of the generic XML device
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 //ID attribute
65 65
 //lang attribute
66 66
         $methodList = [];
67
-        $this->loggerInstance->debug(4,"ALLEAP\n");
68
-        $this->loggerInstance->debug(4,$attr['all_eaps']);
67
+        $this->loggerInstance->debug(4, "ALLEAP\n");
68
+        $this->loggerInstance->debug(4, $attr['all_eaps']);
69 69
         if ($this->allEaps) {
70 70
             $eapmethods = [];
71 71
             foreach ($attr['all_eaps'] as $eap) {
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $objs = [];
138 138
         if ($this->langScope === 'global') {
139 139
             foreach ($attributeList['langs'] as $language => $value) {
140
-                $language = ( $language === 'C' ? 'any' : $language );
140
+                $language = ($language === 'C' ? 'any' : $language);
141 141
                 $obj = new $className();
142 142
                 $obj->setValue($value);
143 143
                 $obj->setAttributes(['lang' => $language]);
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                 $profileNameLangs = $attr['profile:name']['langs'];
162 162
             }
163 163
             foreach ($instNameLangs as $language => $value) {
164
-                $language = ( $language === 'C' ? 'any' : $language );
164
+                $language = ($language === 'C' ? 'any' : $language);
165 165
                 $displayname = new DisplayName();
166 166
                 if (isset($profileNameLangs)) {
167 167
                     $langOrC = isset($profileNameLangs[$language]) ? $profileNameLangs[$language] : $profileNameLangs['C'];
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
             $clientCertificateObject = new ClientCertificate();
313 313
             $clientCertificateObject->setValue(base64_encode($this->clientCert["certdata"]));
314 314
             $clientCertificateObject->setAttributes(['format' => 'PKCS12', 'encoding' => 'base64']);
315
-            $clientsidecredential->setProperty('ClientCertificate',$clientCertificateObject);
315
+            $clientsidecredential->setProperty('ClientCertificate', $clientCertificateObject);
316 316
         }
317 317
         return($clientsidecredential);
318 318
     }
Please login to merge, or discard this patch.