Completed
Push — development ( f36d1a...3b52a6 )
by Nils
08:19
created
includes/libraries/Tree/NestedTree/NestedTree.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -174,7 +174,6 @@  discard block
 block discarded – undo
174 174
      * Fetch the children of a node, or if no node is specified, fetch the
175 175
      * top level items.
176 176
      *
177
-     * @param int  $id          The ID of the node to fetch child data for.
178 177
      * @param bool $includeSelf Whether or not to include the passed node in the
179 178
      *                                  the results.
180 179
      * @return array The children of the passed node
@@ -441,7 +440,6 @@  discard block
 block discarded – undo
441 440
      *                              be able to update the data in it
442 441
      * @param int     $folder_id    The ID of the current node to process
443 442
      * @param int     $fld_level    The nlevel to assign to the current node
444
-     * @param int     $n_tally      A reference to the running tally for the n-value
445 443
      * @param integer $n
446 444
      */
447 445
     public function generateTreeData(&$arr, $folder_id, $fld_level, &$n_tally)
Please login to merge, or discard this patch.
sources/main.queries.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@
 block discarded – undo
199 199
             } elseif (null !== filter_input(INPUT_POST, 'change_pw_origine', FILTER_SANITIZE_STRING)
200 200
                 && ((filter_input(INPUT_POST, 'change_pw_origine', FILTER_SANITIZE_STRING) === "admin_change"
201 201
                     || filter_input(INPUT_POST, 'change_pw_origine', FILTER_SANITIZE_STRING) === "user_change"
202
-                    ) && ($_SESSION['user_admin'] === "1"|| $_SESSION['user_manager'] === "1"
202
+                    ) && ($_SESSION['user_admin'] === "1" || $_SESSION['user_manager'] === "1"
203 203
                     || $_SESSION['user_can_manage_all_users'] === "1")
204 204
                 )
205 205
             ) {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@
 block discarded – undo
201 201
                     logEvents('user_mngt', 'at_user_pwd_changed', $_SESSION['user_id'], $_SESSION['login'], $_SESSION['user_id']);
202 202
                     echo '[ { "error" : "none" } ]';
203 203
                 } else {
204
-                     echo '[ { "error" : "pwd_hash_not_correct" } ]';
204
+                        echo '[ { "error" : "pwd_hash_not_correct" } ]';
205 205
                 }
206 206
                 break;
207 207
 
Please login to merge, or discard this patch.
install/upgrade_ajax.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -427,7 +427,7 @@
 block discarded – undo
427 427
                     } elseif (substr_count($val, '$pre') > 0) {
428 428
                         $pre = getSettingValue($val);
429 429
                     } elseif (substr_count($val, "define('SECUREPATH',") > 0) {
430
-                        $superGlobal->put("sk_file", substr($val, 23, strpos($val, ');')-24)."/sk.php", "SESSION");
430
+                        $superGlobal->put("sk_file", substr($val, 23, strpos($val, ');') - 24)."/sk.php", "SESSION");
431 431
                     }
432 432
                 }
433 433
             }
Please login to merge, or discard this patch.
sources/core.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,8 +85,8 @@
 block discarded – undo
85 85
     );
86 86
     if ($row['valeur'] === "true") {
87 87
         /**
88
-        * Permits to delete files and folders recursively
89
-        */
88
+         * Permits to delete files and folders recursively
89
+         */
90 90
         function delTree($dir)
91 91
         {
92 92
             $files = array_diff(scandir($dir), array('.', '..'));
Please login to merge, or discard this patch.
libraries/Authentication/TwoFactorAuth/Providers/Rng/MCryptRNGProvider.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@
 block discarded – undo
13 13
     
14 14
     public function getRandomBytes($bytecount) {
15 15
         $result = mcrypt_create_iv($bytecount, $this->source);
16
-        if ($result === false)
17
-            throw new \RNGException('mcrypt_create_iv returned an invalid value');
16
+        if ($result === false) {
17
+                    throw new \RNGException('mcrypt_create_iv returned an invalid value');
18
+        }
18 19
         return $result;
19 20
     }
20 21
     
Please login to merge, or discard this patch.
libraries/Authentication/TwoFactorAuth/Providers/Rng/HashRNGProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 {
7 7
     private $algorithm;
8 8
     
9
-    function __construct($algorithm = 'sha256' ) {
9
+    function __construct($algorithm = 'sha256') {
10 10
         $algos = array_values(hash_algos());
11 11
         if (!in_array($algorithm, $algos, true))
12 12
             throw new \RNGException('Unsupported algorithm specified');
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,9 @@
 block discarded – undo
8 8
     
9 9
     function __construct($algorithm = 'sha256' ) {
10 10
         $algos = array_values(hash_algos());
11
-        if (!in_array($algorithm, $algos, true))
12
-            throw new \RNGException('Unsupported algorithm specified');
11
+        if (!in_array($algorithm, $algos, true)) {
12
+                    throw new \RNGException('Unsupported algorithm specified');
13
+        }
13 14
         $this->algorithm = $algorithm;
14 15
     }
15 16
     
Please login to merge, or discard this patch.
libraries/Authentication/TwoFactorAuth/Providers/Rng/OpenSSLRNGProvider.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,10 +13,12 @@
 block discarded – undo
13 13
     
14 14
     public function getRandomBytes($bytecount) {
15 15
         $result = openssl_random_pseudo_bytes($bytecount, $crypto_strong);
16
-        if ($this->requirestrong && ($crypto_strong === false))
17
-            throw new \RNGException('openssl_random_pseudo_bytes returned non-cryptographically strong value');
18
-        if ($result === false)
19
-            throw new \RNGException('openssl_random_pseudo_bytes returned an invalid value');
16
+        if ($this->requirestrong && ($crypto_strong === false)) {
17
+                    throw new \RNGException('openssl_random_pseudo_bytes returned non-cryptographically strong value');
18
+        }
19
+        if ($result === false) {
20
+                    throw new \RNGException('openssl_random_pseudo_bytes returned an invalid value');
21
+        }
20 22
         return $result;
21 23
     }
22 24
     
Please login to merge, or discard this patch.
Authentication/TwoFactorAuth/Providers/Qr/GoogleQRCodeProvider.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
     public function getUrl($qrtext, $size) 
34 34
     {
35 35
         return 'https://chart.googleapis.com/chart?cht=qr'
36
-            . '&chs=' . $size . 'x' . $size
37
-            . '&chld=' . $this->errorcorrectionlevel . '|' . $this->margin
38
-            . '&chl=' . rawurlencode($qrtext);
36
+            . '&chs='.$size.'x'.$size
37
+            . '&chld='.$this->errorcorrectionlevel.'|'.$this->margin
38
+            . '&chl='.rawurlencode($qrtext);
39 39
     }
40 40
 }
41 41
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,9 @@
 block discarded – undo
11 11
 
12 12
     function __construct($verifyssl = false, $errorcorrectionlevel = 'L', $margin = 1) 
13 13
     {
14
-        if (!is_bool($verifyssl))
15
-            throw new \QRException('VerifySSL must be bool');
14
+        if (!is_bool($verifyssl)) {
15
+                    throw new \QRException('VerifySSL must be bool');
16
+        }
16 17
 
17 18
         $this->verifyssl = $verifyssl;
18 19
         
Please login to merge, or discard this patch.
libraries/Authentication/TwoFactorAuth/Providers/Time/HttpTimeProvider.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,14 +36,14 @@
 block discarded – undo
36 36
 
37 37
     public function getTime() {
38 38
         try {
39
-            $context  = stream_context_create($this->options);
39
+            $context = stream_context_create($this->options);
40 40
             $fd = fopen($this->url, 'rb', false, $context);
41 41
             $headers = stream_get_meta_data($fd);
42 42
             fclose($fd);
43 43
 
44 44
             foreach ($headers['wrapper_data'] as $h) {
45 45
                 if (strcasecmp(substr($h, 0, 5), 'Date:') === 0)
46
-                    return \DateTime::createFromFormat($this->expectedtimeformat, trim(substr($h,5)))->getTimestamp();
46
+                    return \DateTime::createFromFormat($this->expectedtimeformat, trim(substr($h, 5)))->getTimestamp();
47 47
             }
48 48
             throw new \TimeException(sprintf('Unable to retrieve time from %s (Invalid or no "Date:" header found)', $this->url));
49 49
         }
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@
 block discarded – undo
42 42
             fclose($fd);
43 43
 
44 44
             foreach ($headers['wrapper_data'] as $h) {
45
-                if (strcasecmp(substr($h, 0, 5), 'Date:') === 0)
46
-                    return \DateTime::createFromFormat($this->expectedtimeformat, trim(substr($h,5)))->getTimestamp();
45
+                if (strcasecmp(substr($h, 0, 5), 'Date:') === 0) {
46
+                                    return \DateTime::createFromFormat($this->expectedtimeformat, trim(substr($h,5)))->getTimestamp();
47
+                }
47 48
             }
48 49
             throw new \TimeException(sprintf('Unable to retrieve time from %s (Invalid or no "Date:" header found)', $this->url));
49
-        }
50
-        catch (Exception $ex) {
50
+        } catch (Exception $ex) {
51 51
             throw new \TimeException(sprintf('Unable to retrieve time from %s (%s)', $this->url, $ex->getMessage()));
52 52
         }
53 53
     }
Please login to merge, or discard this patch.