diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-26 23:46:40 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-26 23:46:40 +0100 |
commit | a661f043e1a8764cb7c795f50df77b830d3e352b (patch) | |
tree | 77a06311ffb5e59c86def06bbb618335da1f2b6a /apps | |
parent | 9be6050cc42c2760bd2276942a24ba3db288b551 (diff) | |
download | nextcloud-server-a661f043e1a8764cb7c795f50df77b830d3e352b.tar.gz nextcloud-server-a661f043e1a8764cb7c795f50df77b830d3e352b.zip |
Remove unneeded semicolon and parentheses
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps')
38 files changed, 48 insertions, 48 deletions
diff --git a/apps/dav/lib/DAV/Sharing/Backend.php b/apps/dav/lib/DAV/Sharing/Backend.php index 141c54899ad..87c094c6d62 100644 --- a/apps/dav/lib/DAV/Sharing/Backend.php +++ b/apps/dav/lib/DAV/Sharing/Backend.php @@ -193,7 +193,7 @@ class Backend { 'href' => "principal:${row['principaluri']}", 'commonName' => isset($p['{DAV:}displayname']) ? $p['{DAV:}displayname'] : '', 'status' => 1, - 'readOnly' => ((int) $row['access'] === self::ACCESS_READ), + 'readOnly' => (int) $row['access'] === self::ACCESS_READ, '{http://owncloud.org/ns}principal' => $row['principaluri'], '{http://owncloud.org/ns}group-share' => is_null($p) ]; diff --git a/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php b/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php index 9e1dee38fbd..b23bf8f14db 100644 --- a/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php @@ -147,7 +147,7 @@ class SystemTagsObjectMappingCollection implements ICollection { function childExists($tagId) { try { - $result = ($this->tagMapper->haveTag([$this->objectId], $this->objectType, $tagId, true)); + $result = $this->tagMapper->haveTag([$this->objectId], $this->objectType, $tagId, true); if ($result) { $tags = $this->tagManager->getTagsByIds([$tagId]); diff --git a/apps/encryption/lib/KeyManager.php b/apps/encryption/lib/KeyManager.php index e52da123fe0..d1776cbe50c 100644 --- a/apps/encryption/lib/KeyManager.php +++ b/apps/encryption/lib/KeyManager.php @@ -211,7 +211,7 @@ class KeyManager { */ public function recoveryKeyExists() { $key = $this->getRecoveryKey(); - return (!empty($key)); + return !empty($key); } /** diff --git a/apps/files/lib/App.php b/apps/files/lib/App.php index b756b123c43..0bf9ae20525 100644 --- a/apps/files/lib/App.php +++ b/apps/files/lib/App.php @@ -57,7 +57,7 @@ class App { public static function extendJsConfig($settings) { $appConfig = json_decode($settings['array']['oc_appconfig'], true); - $maxChunkSize = (int)(\OC::$server->getConfig()->getAppValue('files', 'max_chunk_size', (10 * 1024 * 1024))); + $maxChunkSize = (int)\OC::$server->getConfig()->getAppValue('files', 'max_chunk_size', 10 * 1024 * 1024); $appConfig['files'] = [ 'max_chunk_size' => $maxChunkSize ]; diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php index 4026af2db79..c3b63f053f5 100644 --- a/apps/files/lib/Command/Scan.php +++ b/apps/files/lib/Command/Scan.php @@ -322,7 +322,7 @@ class Scan extends Base { * @return string */ protected function formatExecTime() { - list($secs, ) = explode('.', sprintf("%.1f", ($this->execTime))); + list($secs, ) = explode('.', sprintf("%.1f", $this->execTime)); # if you want to have microseconds add this: . '.' . $tens; return date('H:i:s', $secs); diff --git a/apps/files/lib/Command/ScanAppData.php b/apps/files/lib/Command/ScanAppData.php index f347cb868b1..1eb22d5f68a 100644 --- a/apps/files/lib/Command/ScanAppData.php +++ b/apps/files/lib/Command/ScanAppData.php @@ -260,7 +260,7 @@ class ScanAppData extends Base { * @return string */ protected function formatExecTime() { - list($secs, ) = explode('.', sprintf("%.1f", ($this->execTime))); + list($secs, ) = explode('.', sprintf("%.1f", $this->execTime)); # if you want to have microseconds add this: . '.' . $tens; return date('H:i:s', $secs); diff --git a/apps/files/lib/Settings/Admin.php b/apps/files/lib/Settings/Admin.php index 4965c1e6c17..2f4406c150b 100644 --- a/apps/files/lib/Settings/Admin.php +++ b/apps/files/lib/Settings/Admin.php @@ -56,7 +56,7 @@ class Admin implements ISettings { $maxUploadFilesize = Util::humanFileSize(min($upload_max_filesize, $post_max_size)); $parameters = [ - 'uploadChangable' => (($htaccessWorking and $htaccessWritable) or $userIniWritable ), + 'uploadChangable' => ($htaccessWorking and $htaccessWritable) or $userIniWritable, 'uploadMaxFilesize' => $maxUploadFilesize, // max possible makes only sense on a 32 bit system 'displayMaxPossibleUploadSize' => PHP_INT_SIZE === 4, diff --git a/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php b/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php index dbf14b76da8..7da3458e54d 100644 --- a/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php +++ b/apps/files_external/lib/Lib/Auth/AmazonS3/AccessKey.php @@ -39,7 +39,7 @@ class AccessKey extends AuthMechanism { ->setScheme(self::SCHEME_AMAZONS3_ACCESSKEY) ->setText($l->t('Access key')) ->addParameters([ - (new DefinitionParameter('key', $l->t('Access key'))), + new DefinitionParameter('key', $l->t('Access key')), (new DefinitionParameter('secret', $l->t('Secret key'))) ->setType(DefinitionParameter::VALUE_PASSWORD), ]); diff --git a/apps/files_external/lib/Lib/Auth/OAuth1/OAuth1.php b/apps/files_external/lib/Lib/Auth/OAuth1/OAuth1.php index 2602d5de41b..6a95710b3ef 100644 --- a/apps/files_external/lib/Lib/Auth/OAuth1/OAuth1.php +++ b/apps/files_external/lib/Lib/Auth/OAuth1/OAuth1.php @@ -39,7 +39,7 @@ class OAuth1 extends AuthMechanism { ->addParameters([ (new DefinitionParameter('configured', 'configured')) ->setType(DefinitionParameter::VALUE_HIDDEN), - (new DefinitionParameter('app_key', $l->t('App key'))), + new DefinitionParameter('app_key', $l->t('App key')), (new DefinitionParameter('app_secret', $l->t('App secret'))) ->setType(DefinitionParameter::VALUE_PASSWORD), (new DefinitionParameter('token', 'token')) diff --git a/apps/files_external/lib/Lib/Auth/OAuth2/OAuth2.php b/apps/files_external/lib/Lib/Auth/OAuth2/OAuth2.php index 325efb0e1a0..a5317ae9fa6 100644 --- a/apps/files_external/lib/Lib/Auth/OAuth2/OAuth2.php +++ b/apps/files_external/lib/Lib/Auth/OAuth2/OAuth2.php @@ -39,7 +39,7 @@ class OAuth2 extends AuthMechanism { ->addParameters([ (new DefinitionParameter('configured', 'configured')) ->setType(DefinitionParameter::VALUE_HIDDEN), - (new DefinitionParameter('client_id', $l->t('Client ID'))), + new DefinitionParameter('client_id', $l->t('Client ID')), (new DefinitionParameter('client_secret', $l->t('Client secret'))) ->setType(DefinitionParameter::VALUE_PASSWORD), (new DefinitionParameter('token', 'token')) diff --git a/apps/files_external/lib/Lib/Auth/OpenStack/OpenStack.php b/apps/files_external/lib/Lib/Auth/OpenStack/OpenStack.php index 17c2c8bd146..ca1e0a08ae9 100644 --- a/apps/files_external/lib/Lib/Auth/OpenStack/OpenStack.php +++ b/apps/files_external/lib/Lib/Auth/OpenStack/OpenStack.php @@ -37,11 +37,11 @@ class OpenStack extends AuthMechanism { ->setScheme(self::SCHEME_OPENSTACK) ->setText($l->t('OpenStack')) ->addParameters([ - (new DefinitionParameter('user', $l->t('Username'))), + new DefinitionParameter('user', $l->t('Username')), (new DefinitionParameter('password', $l->t('Password'))) ->setType(DefinitionParameter::VALUE_PASSWORD), - (new DefinitionParameter('tenant', $l->t('Tenant name'))), - (new DefinitionParameter('url', $l->t('Identity endpoint URL'))), + new DefinitionParameter('tenant', $l->t('Tenant name')), + new DefinitionParameter('url', $l->t('Identity endpoint URL')), ]) ; } diff --git a/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php b/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php index caff8e26ae3..14398c1ad82 100644 --- a/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php +++ b/apps/files_external/lib/Lib/Auth/OpenStack/Rackspace.php @@ -37,7 +37,7 @@ class Rackspace extends AuthMechanism { ->setScheme(self::SCHEME_OPENSTACK) ->setText($l->t('Rackspace')) ->addParameters([ - (new DefinitionParameter('user', $l->t('Username'))), + new DefinitionParameter('user', $l->t('Username')), (new DefinitionParameter('key', $l->t('API key'))) ->setType(DefinitionParameter::VALUE_PASSWORD), ]) diff --git a/apps/files_external/lib/Lib/Auth/Password/Password.php b/apps/files_external/lib/Lib/Auth/Password/Password.php index cf8d6b9f458..95a10ebb1d9 100644 --- a/apps/files_external/lib/Lib/Auth/Password/Password.php +++ b/apps/files_external/lib/Lib/Auth/Password/Password.php @@ -37,7 +37,7 @@ class Password extends AuthMechanism { ->setScheme(self::SCHEME_PASSWORD) ->setText($l->t('Username and password')) ->addParameters([ - (new DefinitionParameter('user', $l->t('Username'))), + new DefinitionParameter('user', $l->t('Username')), (new DefinitionParameter('password', $l->t('Password'))) ->setType(DefinitionParameter::VALUE_PASSWORD), ]); diff --git a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php index 425a601d7e9..25c4a1767e9 100644 --- a/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php +++ b/apps/files_external/lib/Lib/Auth/PublicKey/RSA.php @@ -47,8 +47,8 @@ class RSA extends AuthMechanism { ->setScheme(self::SCHEME_PUBLICKEY) ->setText($l->t('RSA public key')) ->addParameters([ - (new DefinitionParameter('user', $l->t('Username'))), - (new DefinitionParameter('public_key', $l->t('Public key'))), + new DefinitionParameter('user', $l->t('Username')), + new DefinitionParameter('public_key', $l->t('Public key')), (new DefinitionParameter('private_key', 'private_key')) ->setType(DefinitionParameter::VALUE_HIDDEN), ]) diff --git a/apps/files_external/lib/Lib/Backend/AmazonS3.php b/apps/files_external/lib/Lib/Backend/AmazonS3.php index 5625805601c..d21794a6847 100644 --- a/apps/files_external/lib/Lib/Backend/AmazonS3.php +++ b/apps/files_external/lib/Lib/Backend/AmazonS3.php @@ -42,7 +42,7 @@ class AmazonS3 extends Backend { ->setStorageClass('\OCA\Files_External\Lib\Storage\AmazonS3') ->setText($l->t('Amazon S3')) ->addParameters([ - (new DefinitionParameter('bucket', $l->t('Bucket'))), + new DefinitionParameter('bucket', $l->t('Bucket')), (new DefinitionParameter('hostname', $l->t('Hostname'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('port', $l->t('Port'))) diff --git a/apps/files_external/lib/Lib/Backend/DAV.php b/apps/files_external/lib/Lib/Backend/DAV.php index a8053f81d36..95d804ba943 100644 --- a/apps/files_external/lib/Lib/Backend/DAV.php +++ b/apps/files_external/lib/Lib/Backend/DAV.php @@ -42,7 +42,7 @@ class DAV extends Backend { ->setStorageClass('\OC\Files\Storage\DAV') ->setText($l->t('WebDAV')) ->addParameters([ - (new DefinitionParameter('host', $l->t('URL'))), + new DefinitionParameter('host', $l->t('URL')), (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('secure', $l->t('Secure https://'))) diff --git a/apps/files_external/lib/Lib/Backend/FTP.php b/apps/files_external/lib/Lib/Backend/FTP.php index edb8884f595..12aee8114f3 100644 --- a/apps/files_external/lib/Lib/Backend/FTP.php +++ b/apps/files_external/lib/Lib/Backend/FTP.php @@ -42,7 +42,7 @@ class FTP extends Backend { ->setStorageClass('\OCA\Files_External\Lib\Storage\FTP') ->setText($l->t('FTP')) ->addParameters([ - (new DefinitionParameter('host', $l->t('Host'))), + new DefinitionParameter('host', $l->t('Host')), (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('secure', $l->t('Secure ftps://'))) diff --git a/apps/files_external/lib/Lib/Backend/Local.php b/apps/files_external/lib/Lib/Backend/Local.php index 298b0af1c7a..528528f2923 100644 --- a/apps/files_external/lib/Lib/Backend/Local.php +++ b/apps/files_external/lib/Lib/Backend/Local.php @@ -38,7 +38,7 @@ class Local extends Backend { ->setStorageClass('\OC\Files\Storage\Local') ->setText($l->t('Local')) ->addParameters([ - (new DefinitionParameter('datadir', $l->t('Location'))), + new DefinitionParameter('datadir', $l->t('Location')), ]) ->setAllowedVisibility(BackendService::VISIBILITY_ADMIN) ->setPriority(BackendService::PRIORITY_DEFAULT + 50) diff --git a/apps/files_external/lib/Lib/Backend/OwnCloud.php b/apps/files_external/lib/Lib/Backend/OwnCloud.php index 0d3ffb30b40..7dcd1f27212 100644 --- a/apps/files_external/lib/Lib/Backend/OwnCloud.php +++ b/apps/files_external/lib/Lib/Backend/OwnCloud.php @@ -40,7 +40,7 @@ class OwnCloud extends Backend { ->setStorageClass('\OCA\Files_External\Lib\Storage\OwnCloud') ->setText($l->t('Nextcloud')) ->addParameters([ - (new DefinitionParameter('host', $l->t('URL'))), + new DefinitionParameter('host', $l->t('URL')), (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('secure', $l->t('Secure https://'))) diff --git a/apps/files_external/lib/Lib/Backend/SFTP.php b/apps/files_external/lib/Lib/Backend/SFTP.php index c9b31272999..561e0496083 100644 --- a/apps/files_external/lib/Lib/Backend/SFTP.php +++ b/apps/files_external/lib/Lib/Backend/SFTP.php @@ -36,7 +36,7 @@ class SFTP extends Backend { ->setStorageClass('\OCA\Files_External\Lib\Storage\SFTP') ->setText($l->t('SFTP')) ->addParameters([ - (new DefinitionParameter('host', $l->t('Host'))), + new DefinitionParameter('host', $l->t('Host')), (new DefinitionParameter('root', $l->t('Root'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), ]) diff --git a/apps/files_external/lib/Lib/Backend/SFTP_Key.php b/apps/files_external/lib/Lib/Backend/SFTP_Key.php index 80ac1ceecc4..62f108cd9dd 100644 --- a/apps/files_external/lib/Lib/Backend/SFTP_Key.php +++ b/apps/files_external/lib/Lib/Backend/SFTP_Key.php @@ -38,7 +38,7 @@ class SFTP_Key extends Backend { ->setStorageClass('\OCA\Files_External\Lib\Storage\SFTP') ->setText($l->t('SFTP with secret key login')) ->addParameters([ - (new DefinitionParameter('host', $l->t('Host'))), + new DefinitionParameter('host', $l->t('Host')), (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), ]) diff --git a/apps/files_external/lib/Lib/Backend/SMB.php b/apps/files_external/lib/Lib/Backend/SMB.php index c4aadbd13f6..38e386005ad 100644 --- a/apps/files_external/lib/Lib/Backend/SMB.php +++ b/apps/files_external/lib/Lib/Backend/SMB.php @@ -44,8 +44,8 @@ class SMB extends Backend { ->setStorageClass('\OCA\Files_External\Lib\Storage\SMB') ->setText($l->t('SMB / CIFS')) ->addParameters([ - (new DefinitionParameter('host', $l->t('Host'))), - (new DefinitionParameter('share', $l->t('Share'))), + new DefinitionParameter('host', $l->t('Host')), + new DefinitionParameter('share', $l->t('Share')), (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('domain', $l->t('Domain'))) diff --git a/apps/files_external/lib/Lib/Backend/SMB_OC.php b/apps/files_external/lib/Lib/Backend/SMB_OC.php index 76126fd649f..54d941ff1db 100644 --- a/apps/files_external/lib/Lib/Backend/SMB_OC.php +++ b/apps/files_external/lib/Lib/Backend/SMB_OC.php @@ -46,7 +46,7 @@ class SMB_OC extends Backend { ->setStorageClass('\OCA\Files_External\Lib\Storage\SMB') ->setText($l->t('SMB / CIFS using OC login')) ->addParameters([ - (new DefinitionParameter('host', $l->t('Host'))), + new DefinitionParameter('host', $l->t('Host')), (new DefinitionParameter('username_as_share', $l->t('Username as share'))) ->setType(DefinitionParameter::VALUE_BOOLEAN), (new DefinitionParameter('share', $l->t('Share'))) diff --git a/apps/files_external/lib/Lib/Backend/Swift.php b/apps/files_external/lib/Lib/Backend/Swift.php index 52ed66b95ae..b0a69ae51e0 100644 --- a/apps/files_external/lib/Lib/Backend/Swift.php +++ b/apps/files_external/lib/Lib/Backend/Swift.php @@ -46,7 +46,7 @@ class Swift extends Backend { ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('region', $l->t('Region'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), - (new DefinitionParameter('bucket', $l->t('Bucket'))), + new DefinitionParameter('bucket', $l->t('Bucket')), (new DefinitionParameter('timeout', $l->t('Request timeout (seconds)'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), ]) diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php index 427a076ffe1..17afb1fcf95 100644 --- a/apps/files_external/lib/Lib/Storage/FTP.php +++ b/apps/files_external/lib/Lib/Storage/FTP.php @@ -150,7 +150,7 @@ class FTP extends StreamWrapper{ */ public static function checkDependencies() { if (function_exists('ftp_login')) { - return(true); + return true; } else { return array('ftp'); } diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php index aeedd3dcd63..aaa7e95bbdf 100644 --- a/apps/files_external/lib/Lib/Storage/Swift.php +++ b/apps/files_external/lib/Lib/Storage/Swift.php @@ -170,7 +170,7 @@ class Swift extends \OC\Files\Storage\Common { $bucketUrl = Url::factory($params['bucket']); if ($bucketUrl->isAbsolute()) { - $this->bucket = end(($bucketUrl->getPathSegments())); + $this->bucket = end($bucketUrl->getPathSegments()); $params['endpoint_url'] = $bucketUrl->addPath('..')->normalizePath(); } else { $this->bucket = $params['bucket']; diff --git a/apps/files_external/lib/Service/BackendService.php b/apps/files_external/lib/Service/BackendService.php index 49af01f5bf9..bd6c525f319 100644 --- a/apps/files_external/lib/Service/BackendService.php +++ b/apps/files_external/lib/Service/BackendService.php @@ -194,7 +194,7 @@ class BackendService { */ public function getAvailableBackends() { return array_filter($this->getBackends(), function($backend) { - return !($backend->checkDependencies()); + return !$backend->checkDependencies(); }); } diff --git a/apps/files_sharing/lib/Helper.php b/apps/files_sharing/lib/Helper.php index c8f46fa8132..684c20c4544 100644 --- a/apps/files_sharing/lib/Helper.php +++ b/apps/files_sharing/lib/Helper.php @@ -225,7 +225,7 @@ class Helper { */ public static function generateUniqueTarget($path, $excludeList, $view) { $pathinfo = pathinfo($path); - $ext = (isset($pathinfo['extension'])) ? '.'.$pathinfo['extension'] : ''; + $ext = isset($pathinfo['extension']) ? '.'.$pathinfo['extension'] : ''; $name = $pathinfo['filename']; $dir = $pathinfo['dirname']; $i = 2; diff --git a/apps/files_sharing/lib/ShareBackend/File.php b/apps/files_sharing/lib/ShareBackend/File.php index 83474546581..e09591b37c0 100644 --- a/apps/files_sharing/lib/ShareBackend/File.php +++ b/apps/files_sharing/lib/ShareBackend/File.php @@ -117,7 +117,7 @@ class File implements \OCP\Share_Backend_File_Dependent { } } - $excludeList = (is_array($exclude)) ? $exclude : array(); + $excludeList = is_array($exclude) ? $exclude : array(); return \OCA\Files_Sharing\Helper::generateUniqueTarget($target, $excludeList, $view); } diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php index 4f0dc89e997..d90673421cd 100644 --- a/apps/files_sharing/lib/SharedMount.php +++ b/apps/files_sharing/lib/SharedMount.php @@ -131,7 +131,7 @@ class SharedMount extends MountPoint implements MoveableMount { */ private function generateUniqueTarget($path, $view, array $mountpoints) { $pathinfo = pathinfo($path); - $ext = (isset($pathinfo['extension'])) ? '.' . $pathinfo['extension'] : ''; + $ext = isset($pathinfo['extension']) ? '.' . $pathinfo['extension'] : ''; $name = $pathinfo['filename']; $dir = $pathinfo['dirname']; diff --git a/apps/files_trashbin/lib/Trashbin.php b/apps/files_trashbin/lib/Trashbin.php index ca4b406c648..a9eb5224728 100644 --- a/apps/files_trashbin/lib/Trashbin.php +++ b/apps/files_trashbin/lib/Trashbin.php @@ -873,10 +873,10 @@ class Trashbin { foreach ($matches as $ma) { if ($timestamp) { $parts = explode('.v', substr($ma['path'], 0, $offset)); - $versions[] = (end($parts)); + $versions[] = end($parts); } else { $parts = explode('.v', $ma); - $versions[] = (end($parts)); + $versions[] = end($parts); } } } diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 9b367d6edc2..3d182077764 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -746,7 +746,7 @@ class Access extends LDAPUtility implements IUserTools { */ private function _createAltInternalOwnCloudNameForGroups($name) { $usedNames = $this->groupMapper->getNamesBySearch($name, "", '_%'); - if(!($usedNames) || count($usedNames) === 0) { + if(!$usedNames || count($usedNames) === 0) { $lastNo = 1; //will become name_2 } else { natsort($usedNames); @@ -842,7 +842,7 @@ class Access extends LDAPUtility implements IUserTools { }); } $this->batchApplyUserAttributes($recordsToUpdate); - return $this->fetchList($ldapRecords, (count($attr) > 1)); + return $this->fetchList($ldapRecords, count($attr) > 1); } /** @@ -886,7 +886,7 @@ class Access extends LDAPUtility implements IUserTools { * @return array */ public function fetchListOfGroups($filter, $attr, $limit = null, $offset = null) { - return $this->fetchList($this->searchGroups($filter, $attr, $limit, $offset), (count($attr) > 1)); + return $this->fetchList($this->searchGroups($filter, $attr, $limit, $offset), count($attr) > 1); } /** diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php index 25d3f66c52d..1ea3cc67303 100644 --- a/apps/user_ldap/lib/Connection.php +++ b/apps/user_ldap/lib/Connection.php @@ -113,7 +113,7 @@ class Connection extends LDAPUtility { public function __destruct() { if(!$this->dontDestruct && $this->ldap->isResource($this->ldapConnectionRes)) { @$this->ldap->unbind($this->ldapConnectionRes); - }; + } } /** diff --git a/apps/user_ldap/lib/Group_Proxy.php b/apps/user_ldap/lib/Group_Proxy.php index ad3fba4092f..9fccb64cd46 100644 --- a/apps/user_ldap/lib/Group_Proxy.php +++ b/apps/user_ldap/lib/Group_Proxy.php @@ -73,7 +73,7 @@ class Group_Proxy extends Proxy implements \OCP\GroupInterface, IGroupLDAP { * @return mixed, the result of the method or false */ protected function callOnLastSeenOn($gid, $method, $parameters, $passOnWhen) { - $cacheKey = $this->getGroupCacheKey($gid);; + $cacheKey = $this->getGroupCacheKey($gid); $prefix = $this->getFromCache($cacheKey); //in case the uid has been found in the past, try this stored connection first if(!is_null($prefix)) { diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php index 4943a370316..5a2b993c334 100644 --- a/apps/user_ldap/lib/User_LDAP.php +++ b/apps/user_ldap/lib/User_LDAP.php @@ -549,7 +549,7 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn | Backend::GET_DISPLAYNAME | Backend::PROVIDE_AVATAR | Backend::COUNT_USERS - | (((int)$this->access->connection->turnOnPasswordChange === 1)?(Backend::SET_PASSWORD):0) + | (((int)$this->access->connection->turnOnPasswordChange === 1)? Backend::SET_PASSWORD :0) | $this->userPluginManager->getImplementedActions()) & $actions); } diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php index 57f900a8865..23c4976c2fa 100644 --- a/apps/user_ldap/lib/Wizard.php +++ b/apps/user_ldap/lib/Wizard.php @@ -245,7 +245,7 @@ class Wizard extends LDAPUtility { $this->applyFind('ldap_display_name', $attr); return $this->result; } - }; + } throw new \Exception(self::$l->t('Could not detect user display name attribute. Please specify it yourself in advanced LDAP settings.')); } diff --git a/apps/user_ldap/templates/renewpassword.php b/apps/user_ldap/templates/renewpassword.php index 7b1df75e06b..9fc4271d6be 100644 --- a/apps/user_ldap/templates/renewpassword.php +++ b/apps/user_ldap/templates/renewpassword.php @@ -23,7 +23,7 @@ style('user_ldap', 'renewPassword'); <?php p($message); ?><br> </div> <?php endforeach; ?> - <?php if (isset($_['internalexception']) && ($_['internalexception'])): ?> + <?php if (isset($_['internalexception']) && $_['internalexception']): ?> <div class="warning"> <?php p($l->t('An internal error occurred.')); ?><br> <small><?php p($l->t('Please try again or contact your administrator.')); ?></small> diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php index 42bbaaf78ca..1e1c85db247 100644 --- a/apps/user_ldap/templates/settings.php +++ b/apps/user_ldap/templates/settings.php @@ -71,10 +71,10 @@ style('user_ldap', 'settings'); print_unescaped('<p class="ldapwarning">'.$l->t('<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it.').'</p>'); } ?> - <?php require_once(__DIR__ . '/part.wizard-server.php'); ?> - <?php require_once(__DIR__ . '/part.wizard-userfilter.php'); ?> - <?php require_once(__DIR__ . '/part.wizard-loginfilter.php'); ?> - <?php require_once(__DIR__ . '/part.wizard-groupfilter.php'); ?> + <?php require_once __DIR__ . '/part.wizard-server.php'; ?> + <?php require_once __DIR__ . '/part.wizard-userfilter.php'; ?> + <?php require_once __DIR__ . '/part.wizard-loginfilter.php'; ?> + <?php require_once __DIR__ . '/part.wizard-groupfilter.php'; ?> <fieldset id="ldapSettings-1"> <div id="ldapAdvancedAccordion"> <h3><?php p($l->t('Connection Settings'));?></h3> |