Passed
Push — master ( 720304...81d426 )
by Tomasz
05:16 queued 48s
created
core/diag/Sociopath.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -56,34 +56,34 @@
 block discarded – undo
56 56
         // let's start the numbering at 1
57 57
         $this->qaArray = [
58 58
             1 => ["AREA" => AbstractTest::INFRA_DEVICE,
59
-                  "TXT" => _("Have you ever used the network succesfully, e.g. at your home institution without roaming?"),
60
-                  "FACTOR" => 0.5,
61
-                  "VERDICTLECTURE" => sprintf(_("If your device has never worked before with this setup, then very likely your device configuation is wrong. %s"), $confAssistantText)],
59
+                    "TXT" => _("Have you ever used the network succesfully, e.g. at your home institution without roaming?"),
60
+                    "FACTOR" => 0.5,
61
+                    "VERDICTLECTURE" => sprintf(_("If your device has never worked before with this setup, then very likely your device configuation is wrong. %s"), $confAssistantText)],
62 62
             2 => ["AREA" => AbstractTest::INFRA_DEVICE, 
63
-                  "TXT" => _("Did the device previously work when roaming, i.e. at other hotspots away from your home institution?"), 
64
-                  "FACTOR" => 0.33,
65
-                  "VERDICTLECTURE" => sprintf(_("If roaming consistently does not work, then very likely your device configuration is wrong. Typical errors causing this symptom include: using a routing ('outer') username without the @realm.tld suffix - those potentially work at home, but can not be used when roaming. %s"),$confAssistantText)],
63
+                    "TXT" => _("Did the device previously work when roaming, i.e. at other hotspots away from your home institution?"), 
64
+                    "FACTOR" => 0.33,
65
+                    "VERDICTLECTURE" => sprintf(_("If roaming consistently does not work, then very likely your device configuration is wrong. Typical errors causing this symptom include: using a routing ('outer') username without the @realm.tld suffix - those potentially work at home, but can not be used when roaming. %s"),$confAssistantText)],
66 66
             3 => ["AREA" => AbstractTest::INFRA_DEVICE, 
67
-                  "TXT" => _("Did you recently change the configuration on your device?"), 
68
-                  "FACTOR" => 3,
69
-                  "VERDICTLECTURE" => _("Accounts only need to be configured once, and can then be used anywhere on the planet without any changes. If you recently changed the configuration, that change may very well be at fault. You should never change your network configuration unless explicitly instructed so by your Identity Provider; even in the case of temporary login issues.")],
67
+                    "TXT" => _("Did you recently change the configuration on your device?"), 
68
+                    "FACTOR" => 3,
69
+                    "VERDICTLECTURE" => _("Accounts only need to be configured once, and can then be used anywhere on the planet without any changes. If you recently changed the configuration, that change may very well be at fault. You should never change your network configuration unless explicitly instructed so by your Identity Provider; even in the case of temporary login issues.")],
70 70
             4 => ["AREA" => AbstractTest::INFRA_DEVICE, 
71
-                  "TXT" => _("Do your other devices still work?"),
72
-                  "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"),
73
-                  "FACTOR" => 0.33],
71
+                    "TXT" => _("Do your other devices still work?"),
72
+                    "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"),
73
+                    "FACTOR" => 0.33],
74 74
             5 => ["AREA" => AbstractTest::INFRA_SP_80211, 
75
-                  "TXT" => _("Is the place you are currently at heavily crowded, or is a network-intensive workload going on?"), 
76
-                  "FACTOR" => 3,
77
-                  "VERDICTLECTURE" => _("The network is likely overloaded at this location and point in time. You may have to wait until later before you get a better connectivity. If you think the network should be reinforced for more capacity at this place, you should inform the hotspot provider. [MGW: add contact info]")],            
75
+                    "TXT" => _("Is the place you are currently at heavily crowded, or is a network-intensive workload going on?"), 
76
+                    "FACTOR" => 3,
77
+                    "VERDICTLECTURE" => _("The network is likely overloaded at this location and point in time. You may have to wait until later before you get a better connectivity. If you think the network should be reinforced for more capacity at this place, you should inform the hotspot provider. [MGW: add contact info]")],            
78 78
             6 => ["AREA" => AbstractTest::INFRA_SP_80211, 
79
-                  "TXT" => _("Does the connection get better when you move around?"), 
80
-                  "FACTOR" => 3,
81
-                  "VERDICTLECTURE" => _("You should move to a different location to achieve better network coverage and service. If you think the exact spot you are at deserves better coverage, you should inform the hotspot provider. [MGW: add contact info]")],
79
+                    "TXT" => _("Does the connection get better when you move around?"), 
80
+                    "FACTOR" => 3,
81
+                    "VERDICTLECTURE" => _("You should move to a different location to achieve better network coverage and service. If you think the exact spot you are at deserves better coverage, you should inform the hotspot provider. [MGW: add contact info]")],
82 82
             
83 83
             7 => ["AREA" => AbstractTest::INFRA_SP_LAN, 
84
-                  "TXT" => _("Do you see errors stating something similar to 'Unable to get IP address'?"), 
85
-                  "FACTOR" => 3,
86
-                  "VERDICTLECTURE" => _("The evidence at hand suggests that there may be an infrastructure problem at this particular hotspot provider. There is nothing you can do to solve this problem locally. Please be patient and try again at a later time.")],
84
+                    "TXT" => _("Do you see errors stating something similar to 'Unable to get IP address'?"), 
85
+                    "FACTOR" => 3,
86
+                    "VERDICTLECTURE" => _("The evidence at hand suggests that there may be an infrastructure problem at this particular hotspot provider. There is nothing you can do to solve this problem locally. Please be patient and try again at a later time.")],
87 87
         ];
88 88
     }
89 89
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             2 => ["AREA" => AbstractTest::INFRA_DEVICE, 
63 63
                   "TXT" => _("Did the device previously work when roaming, i.e. at other hotspots away from your home institution?"), 
64 64
                   "FACTOR" => 0.33,
65
-                  "VERDICTLECTURE" => sprintf(_("If roaming consistently does not work, then very likely your device configuration is wrong. Typical errors causing this symptom include: using a routing ('outer') username without the @realm.tld suffix - those potentially work at home, but can not be used when roaming. %s"),$confAssistantText)],
65
+                  "VERDICTLECTURE" => sprintf(_("If roaming consistently does not work, then very likely your device configuration is wrong. Typical errors causing this symptom include: using a routing ('outer') username without the @realm.tld suffix - those potentially work at home, but can not be used when roaming. %s"), $confAssistantText)],
66 66
             3 => ["AREA" => AbstractTest::INFRA_DEVICE, 
67 67
                   "TXT" => _("Did you recently change the configuration on your device?"), 
68 68
                   "FACTOR" => 3,
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
         $questionDetails = $this->qaArray[$questionNumber];
100 100
         if ($answer === TRUE) {
101 101
             $this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] * $questionDetails["FACTOR"];
102
-            $this->loggerInstance->debug(3,"Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR"]."\n");
102
+            $this->loggerInstance->debug(3, "Adjusting " . $questionDetails['AREA'] . " by " . $questionDetails["FACTOR"] . "\n");
103 103
             $factor = $questionDetails["FACTOR"];
104 104
         } elseif ($answer === FALSE) {
105 105
             $this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] / $questionDetails["FACTOR"];
106
-            $this->loggerInstance->debug(3,"Adjusting ".$questionDetails['AREA']." by 1/".$questionDetails["FACTOR"]."\n");
107
-            $factor = 1/$questionDetails["FACTOR"];
106
+            $this->loggerInstance->debug(3, "Adjusting " . $questionDetails['AREA'] . " by 1/" . $questionDetails["FACTOR"] . "\n");
107
+            $factor = 1 / $questionDetails["FACTOR"];
108 108
         } else {
109 109
             $factor = 1;
110 110
         }
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
         $this->additionalFindings["QUESTIONSASKED"] = $this->previousQuestions;
114 114
         $_SESSION["SUSPECTS"] = $this->possibleFailureReasons;
115 115
         $_SESSION["EVIDENCE"] = $this->additionalFindings;
116
-        $this->loggerInstance->debug(3,$_SESSION['SUSPECTS']);
117
-        $this->loggerInstance->debug(3,$_SESSION['EVIDENCE']);
116
+        $this->loggerInstance->debug(3, $_SESSION['SUSPECTS']);
117
+        $this->loggerInstance->debug(3, $_SESSION['EVIDENCE']);
118 118
     }
119 119
     
120 120
     public function questionOracle() {
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         // if both are identical, take any of the questions in the pool of both
129 129
         foreach ($this->qaArray as $questionNumber => $questionDetails) {
130 130
             // if we find a question we didn't ask before AND it is related to our currently high-scoring problem area, ask it
131
-            if (!array_key_exists($questionNumber, $this->previousQuestions) && ( $questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory) ) {
131
+            if (!array_key_exists($questionNumber, $this->previousQuestions) && ($questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory)) {
132 132
                 return json_encode(["NEXTEXISTS" => TRUE, "NUMBER" => $questionNumber, "TEXT" => $questionDetails["TXT"]]);
133 133
             }
134 134
         }
@@ -137,14 +137,14 @@  discard block
 block discarded – undo
137 137
     }
138 138
     
139 139
     public function getCurrentGuessState() {
140
-        return json_encode([ "SUSPECTS" => $this->possibleFailureReasons, "EVIDENCE" => $this->additionalFindings ]);
140
+        return json_encode(["SUSPECTS" => $this->possibleFailureReasons, "EVIDENCE" => $this->additionalFindings]);
141 141
     }
142 142
     
143 143
     public function verdictText($area) {
144 144
         $text = $this->genericVerdictTexts[$area];
145 145
         foreach ($this->previousQuestions as $number => $factor) {
146 146
             if ($this->qaArray[$number]["AREA"] == $area && $factor > 1) {
147
-                $text .= "\n\n".$this->qaArray[$number]["VERDICTLECTURE"];
147
+                $text .= "\n\n" . $this->qaArray[$number]["VERDICTLECTURE"];
148 148
             }
149 149
         }
150 150
         return $text;
Please login to merge, or discard this patch.
web/lib/admin/UIElements.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $dummy_inst1 = _("identity provider");
48 48
         $dummy_inst2 = _("organisation");
49 49
         // and do something useless with the strings so that there's no "unused" complaint
50
-        if ( $dummy_NRO . $dummy_inst1 . $dummy_inst2 == "") {
50
+        if ($dummy_NRO . $dummy_inst1 . $dummy_inst2 == "") {
51 51
             // Oh well.
52 52
         }
53 53
         $this->nomenclature_fed = _(CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']);
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                         }
187 187
                         break;
188 188
                     case "boolean":
189
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>";
189
+                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off")) . "</strong></td></tr>";
190 190
                         break;
191 191
                     default:
192 192
                         $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>";
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
     
314 314
     private function checkROWIDpresence($reference) {
315 315
         $found = preg_match("/^ROWID-.*/", $reference);
316
-        if ($found  != 1) { // get excited on not-found AND on execution error
316
+        if ($found != 1) { // get excited on not-found AND on execution error
317 317
             throw new Exception("Error, ROWID expected.");
318 318
         }
319 319
     }
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 
337 337
         $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']);
338 338
         $details['name'] = preg_replace('/\//', "", $details['name']);
339
-        $certstatus = ( $details['root'] == 1 ? "R" : "I");
339
+        $certstatus = ($details['root'] == 1 ? "R" : "I");
340 340
         if ($details['ca'] == 0 && $details['root'] != 1) {
341 341
             return "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon;  border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . _("This is a <strong>SERVER</strong> certificate!") . "<br/>" . $details['name'] . "</div>";
342 342
         }
Please login to merge, or discard this patch.
config/config-diagnostics-template.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
      */
60 60
 
61 61
         /**
62
-     * Various paths.
63
-     * eapol_test: absolute path to the eapol_test executable. If you just fill in "eapol_test" the one from the system $PATH will be taken.
64
-     * c_rehash: absolute path to the c_rehash executable. If you just fill in "c_rehash" the one from the system $PATH will be taken.
65
-     *   See also NSIS_VERSION further down
66
-     * @var array
67
-     */
62
+         * Various paths.
63
+         * eapol_test: absolute path to the eapol_test executable. If you just fill in "eapol_test" the one from the system $PATH will be taken.
64
+         * c_rehash: absolute path to the c_rehash executable. If you just fill in "c_rehash" the one from the system $PATH will be taken.
65
+         *   See also NSIS_VERSION further down
66
+         * @var array
67
+         */
68 68
     'PATHS' => [
69 69
         'c_rehash' => 'c_rehash',
70 70
         'eapol_test' => 'eapol_test',
@@ -101,45 +101,45 @@  discard block
 block discarded – undo
101 101
         ],
102 102
 
103 103
         'TLS-clientcerts' => [
104
-          'CA1' => [
104
+            'CA1' => [
105 105
             'status' => 'ACCREDITED',
106 106
             'issuerCA' => '/DC=org/DC=pki1/CN=PKI 1',
107 107
             'certificates' => [
108
-              [
108
+                [
109 109
                 'status' => 'CORRECT',
110 110
                 'public' => 'ca1-client-cert.pem',
111 111
                 'private' => 'ca1-client-key.pem',
112 112
                 'expected' => 'PASS'],
113
-              [
113
+                [
114 114
                 'status' => 'WRONGPOLICY',
115 115
                 'public' => 'ca1-nopolicy-cert.pem',
116 116
                 'private' => 'ca1-nopolicy-key.key',
117 117
                 'expected' => 'FAIL'],
118
-              [
118
+                [
119 119
                 'status' => 'EXPIRED',
120 120
                 'public' => 'ca1-exp.pem',
121 121
                 'private' => 'ca1-exp.key',
122 122
                 'expected' => 'FAIL'],
123
-              [
123
+                [
124 124
                 'status' => 'REVOKED',
125 125
                 'public' => 'ca1-revoked.pem',
126 126
                 'private' => 'ca1-revoked.key',
127 127
                 'expected' => 'FAIL'],
128 128
             ]
129
-          ],
130
-          'CA-N' => [
129
+            ],
130
+            'CA-N' => [
131 131
             'status' => 'NONACCREDITED',
132 132
             'issuerCA' => '/DC=org/DC=pkiN/CN=PKI N',
133 133
             'certificates' => [
134
-               [
134
+                [
135 135
                 'status' => 'CORRECT',
136 136
                 'public' => 'caN-client-cert.pem',
137 137
                 'private' => 'caN-client-cert.key',
138 138
                 'expected' => 'FAIL'],
139
-               ]
140
-          ]
141
-      ],
142
-      'accreditedCAsURL' => '',
139
+                ]
140
+            ]
141
+        ],
142
+        'accreditedCAsURL' => '',
143 143
     ],
144 144
     'eduGainResolver' => [
145 145
         'url' => 'https://technical.edugain.org/api.php',
Please login to merge, or discard this patch.