]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use braces on single line if statements
authorRobin McCorkell <rmccorkell@karoshi.org.uk>
Wed, 26 Mar 2014 15:11:09 +0000 (15:11 +0000)
committerRobin McCorkell <rmccorkell@karoshi.org.uk>
Wed, 26 Mar 2014 15:11:09 +0000 (15:11 +0000)
apps/files_external/lib/smb_oc.php

index ac325cd4fbc5704c7a7e2e06b1284e27968ede57..0c79c06c5df13863b68d295c4466f5d04234ae87 100644 (file)
@@ -54,8 +54,9 @@ class SMB_OC extends \OC\Files\Storage\SMB {
 
        public function test($isPersonal = true) {
                if ($isPersonal) {
-                       if ($this->stat(''))
+                       if ($this->stat('')) {
                                return true;
+                       }
                        return false;
                } else {
                        $smb = new \smb();
@@ -67,23 +68,26 @@ class SMB_OC extends \OC\Files\Storage\SMB {
 
                        // Share cannot be checked if dynamic
                        if ($this->username_as_share) {
-                               if ($smb->look($pu))
+                               if ($smb->look($pu)) {
                                        return true;
-                               else
+                               } else {
                                        return false;
+                               }
                        }
-                       if (!$pu['share'])
+                       if (!$pu['share']) {
                                return false;
+                       }
 
                        // The following error messages are expected due to anonymous login
                        $regexp = array(
                                '(NT_STATUS_ACCESS_DENIED)' => 'skip'
                        ) + $smb->getRegexp();
 
-                       if ($smb->client("-d 0 " . escapeshellarg('//' . $pu['host'] . '/' . $pu['share']) . " -c exit", $pu, $regexp))
+                       if ($smb->client("-d 0 " . escapeshellarg('//' . $pu['host'] . '/' . $pu['share']) . " -c exit", $pu, $regexp)) {
                                return true;
-                       else
+                       } else {
                                return false;
+                       }
                }
        }
 }