Passed
Push — master ( b12420...89ca6f )
by Tomasz
05:10
created
core/User.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      * user is a federation administrator of *any* federation. When given a parameter (ISO shortname of federation), it checks
81 81
      * if the user administers this particular federation.
82 82
      * 
83
-     * @param string $federation optional: federation to be checked
83
+     * @param integer $federation optional: federation to be checked
84 84
      * @return boolean TRUE if the user is federation admin, FALSE if not 
85 85
      */
86 86
     public function isFederationAdmin($federation = 0) {
@@ -124,6 +124,9 @@  discard block
 block discarded – undo
124 124
         return FALSE;
125 125
     }
126 126
 
127
+    /**
128
+     * @param string $content
129
+     */
127 130
     public function sendMailToUser($subject, $content) {
128 131
         $mailaddr = $this->getAttributes("user:email");
129 132
         if (count($mailaddr) == 0) { // we don't know user's mail address
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                 }
187 187
                 $lookFor .= "$name";
188 188
             }
189
-            $finding = preg_match("/^(".$lookFor."):(.*)/", $oneRow->user_id, $matches);
189
+            $finding = preg_match("/^(" . $lookFor . "):(.*)/", $oneRow->user_id, $matches);
190 190
             if ($finding === 0 || $finding === FALSE) {
191 191
                 return FALSE;
192 192
             }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                             $url = CONFIG_DIAGNOSTICS['eduGainResolver']['url'] . "?action=get_entity_name&type=idp&e_id=$idp&lang=pl";
208 208
                             $ch = curl_init($url);
209 209
                             curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
210
-                            curl_setopt($ch,CURLOPT_TIMEOUT, CONFIG_DIAGNOSTICS['eduGainResolver']['timeout']);
210
+                            curl_setopt($ch, CURLOPT_TIMEOUT, CONFIG_DIAGNOSTICS['eduGainResolver']['timeout']);
211 211
                             $response = curl_exec($ch);
212 212
                             if ($response == FALSE) {
213 213
                                 $skipCurl = 1;
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
                 case $providerStrings[3]:
225 225
                 case $providerStrings[4]:
226 226
                 case $providerStrings[5]:
227
-                    if (!in_array(User::PROVIDER_STRINGS[$matches[1]],$listOfProviders)) {
227
+                    if (!in_array(User::PROVIDER_STRINGS[$matches[1]], $listOfProviders)) {
228 228
                         $providerName = $this->getEdugainName(User::PROVIDER_STRINGS[$matches[1]]);
229 229
                         $listOfProviders[] = $providerName . "xx";
230 230
 //                        $listOfProviders[] = User::PROVIDER_STRINGS[$matches[1]];
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' => 'http://technical.edugain.org/api.php',
Please login to merge, or discard this patch.