diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2020-04-09 21:39:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-09 21:39:37 +0300 |
commit | 008e6d7e849a82fdc3aa20169c4c8bdd0fe506be (patch) | |
tree | 6abbe3d8741de956ad787b5e3d55cec85ceb558f /apps | |
parent | 64510932b8bd7d4d1d490f7da7fb9ebcf21e31c2 (diff) | |
parent | 3a415e4139d6e28c16b0420ab411e6df5ff6d54a (diff) |
Merge pull request #20391 from nextcloud/refactor/spaces-cleanup
Remove all extra whitespace PSR2 does not like
Diffstat (limited to 'apps')
84 files changed, 151 insertions, 162 deletions
diff --git a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php index d99e6c2d006..3b8b29a49cd 100644 --- a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php +++ b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php @@ -133,7 +133,7 @@ class RequestHandlerController extends Controller { $shareType === null || !is_array($protocol) || !isset($protocol['name']) || - !isset ($protocol['options']) || + !isset($protocol['options']) || !is_array($protocol['options']) || !isset($protocol['options']['sharedSecret']) ) { diff --git a/apps/comments/lib/EventHandler.php b/apps/comments/lib/EventHandler.php index 62202cc8501..4364550a222 100644 --- a/apps/comments/lib/EventHandler.php +++ b/apps/comments/lib/EventHandler.php @@ -55,7 +55,7 @@ class EventHandler implements ICommentsEventHandler { } $eventType = $event->getEvent(); - if( $eventType === CommentsEvent::EVENT_ADD + if($eventType === CommentsEvent::EVENT_ADD ) { $this->notificationHandler($event); $this->activityHandler($event); diff --git a/apps/comments/lib/Listener/LoadAdditionalScripts.php b/apps/comments/lib/Listener/LoadAdditionalScripts.php index 764e48c582a..ddaf288394b 100644 --- a/apps/comments/lib/Listener/LoadAdditionalScripts.php +++ b/apps/comments/lib/Listener/LoadAdditionalScripts.php @@ -39,7 +39,7 @@ class LoadAdditionalScripts implements IEventListener { return; } - // TODO: make sure to only include the sidebar script when + // TODO: make sure to only include the sidebar script when // we properly split it between files list and sidebar Util::addScript(Application::APP_ID, 'comments'); } diff --git a/apps/comments/lib/Listener/LoadSidebarScripts.php b/apps/comments/lib/Listener/LoadSidebarScripts.php index b27da57a16e..209c62dc406 100644 --- a/apps/comments/lib/Listener/LoadSidebarScripts.php +++ b/apps/comments/lib/Listener/LoadSidebarScripts.php @@ -38,7 +38,7 @@ class LoadSidebarScripts implements IEventListener { return; } - // TODO: make sure to only include the sidebar script when + // TODO: make sure to only include the sidebar script when // we properly split it between files list and sidebar Util::addScript(Application::APP_ID, 'comments'); } diff --git a/apps/comments/lib/Notification/Listener.php b/apps/comments/lib/Notification/Listener.php index 3acdce4e473..ba645ac5779 100644 --- a/apps/comments/lib/Notification/Listener.php +++ b/apps/comments/lib/Notification/Listener.php @@ -65,7 +65,7 @@ class Listener { $notification = $this->instantiateNotification($comment); foreach($mentions as $uid) { - if( ($comment->getActorType() === 'users' && $uid === $comment->getActorId()) + if(($comment->getActorType() === 'users' && $uid === $comment->getActorId()) || !$this->userManager->userExists($uid) ) { // do not notify unknown users or yourself @@ -73,7 +73,7 @@ class Listener { } $notification->setUser($uid); - if( $event->getEvent() === CommentsEvent::EVENT_DELETE + if($event->getEvent() === CommentsEvent::EVENT_DELETE || $event->getEvent() === CommentsEvent::EVENT_PRE_UPDATE) { $this->notificationManager->markProcessed($notification); diff --git a/apps/dav/lib/CalDAV/CachedSubscription.php b/apps/dav/lib/CalDAV/CachedSubscription.php index baba0727f21..093a86dcad0 100644 --- a/apps/dav/lib/CalDAV/CachedSubscription.php +++ b/apps/dav/lib/CalDAV/CachedSubscription.php @@ -135,7 +135,7 @@ class CachedSubscription extends \Sabre\CalDAV\Calendar { } $obj['acl'] = $this->getChildACL(); - return new CachedSubscriptionObject ($this->caldavBackend, $this->calendarInfo, $obj); + return new CachedSubscriptionObject($this->caldavBackend, $this->calendarInfo, $obj); } diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index f947ea9d01e..a6f1cef7095 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -805,11 +805,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription foreach ($mutations as $propertyName => $propertyValue) { switch ($propertyName) { - case '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' : + case '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp': $fieldName = 'transparent'; $newValues[$fieldName] = (int) ($propertyValue->getValue() === 'transparent'); break; - default : + default: $fieldName = $this->propertyMap[$propertyName]; $newValues[$fieldName] = $propertyValue; break; @@ -1812,13 +1812,13 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription foreach($changes as $uri => $operation) { switch($operation) { - case 1 : + case 1: $result['added'][] = $uri; break; - case 2 : + case 2: $result['modified'][] = $uri; break; - case 3 : + case 3: $result['deleted'][] = $uri; break; } diff --git a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php index 59b97312062..214fb79464e 100644 --- a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php +++ b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php @@ -176,7 +176,7 @@ class PublishPlugin extends ServerPlugin { switch ($documentType) { - case '{'.self::NS_CALENDARSERVER.'}publish-calendar' : + case '{'.self::NS_CALENDARSERVER.'}publish-calendar': // We can only deal with IShareableCalendar objects if (!$node instanceof Calendar) { @@ -204,7 +204,7 @@ class PublishPlugin extends ServerPlugin { // Breaking the event chain return false; - case '{'.self::NS_CALENDARSERVER.'}unpublish-calendar' : + case '{'.self::NS_CALENDARSERVER.'}unpublish-calendar': // We can only deal with IShareableCalendar objects if (!$node instanceof Calendar) { diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index 1f44b63a575..54427404db5 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -369,10 +369,10 @@ class CardDavBackend implements BackendInterface, SyncSupport { foreach($mutations as $property=>$newValue) { switch($property) { - case '{DAV:}displayname' : + case '{DAV:}displayname': $updates['displayname'] = $newValue; break; - case '{' . Plugin::NS_CARDDAV . '}addressbook-description' : + case '{' . Plugin::NS_CARDDAV . '}addressbook-description': $updates['description'] = $newValue; break; } @@ -414,13 +414,13 @@ class CardDavBackend implements BackendInterface, SyncSupport { foreach($properties as $property=>$newValue) { switch($property) { - case '{DAV:}displayname' : + case '{DAV:}displayname': $values['displayname'] = $newValue; break; - case '{' . Plugin::NS_CARDDAV . '}addressbook-description' : + case '{' . Plugin::NS_CARDDAV . '}addressbook-description': $values['description'] = $newValue; break; - default : + default: throw new BadRequest('Unknown property: ' . $property); } diff --git a/apps/dav/lib/CardDAV/ImageExportPlugin.php b/apps/dav/lib/CardDAV/ImageExportPlugin.php index 396d847d883..74faa5d7df9 100644 --- a/apps/dav/lib/CardDAV/ImageExportPlugin.php +++ b/apps/dav/lib/CardDAV/ImageExportPlugin.php @@ -97,7 +97,7 @@ class ImageExportPlugin extends ServerPlugin { $addressbook = $this->server->tree->getNodeForPath($addressbookpath); $response->setHeader('Cache-Control', 'private, max-age=3600, must-revalidate'); - $response->setHeader('Etag', $node->getETag() ); + $response->setHeader('Etag', $node->getETag()); $response->setHeader('Pragma', 'public'); try { diff --git a/apps/dav/lib/Command/MoveCalendar.php b/apps/dav/lib/Command/MoveCalendar.php index 9efd63722df..8399fb5ed32 100644 --- a/apps/dav/lib/Command/MoveCalendar.php +++ b/apps/dav/lib/Command/MoveCalendar.php @@ -180,7 +180,7 @@ class MoveCalendar extends Command { */ if (count($shares) > 0) { $this->io->note([ - "Please note that moving calendar " . $calendar['uri'] . " from user <$userOrigin> to <$userDestination> has caused share links to change.", + "Please note that moving calendar " . $calendar['uri'] . " from user <$userOrigin> to <$userDestination> has caused share links to change.", "Sharees will need to change \"example.com/remote.php/dav/calendars/uid/" . $calendar['uri'] . "_shared_by_$userOrigin\" to \"example.com/remote.php/dav/calendars/uid/" . $calendar['uri'] . "_shared_by_$userDestination\"" ]); } diff --git a/apps/dav/lib/Comments/CommentNode.php b/apps/dav/lib/Comments/CommentNode.php index d54f81b7a8e..d24c41409ba 100644 --- a/apps/dav/lib/Comments/CommentNode.php +++ b/apps/dav/lib/Comments/CommentNode.php @@ -131,7 +131,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { protected function checkWriteAccessOnComment() { $user = $this->userSession->getUser(); - if( $this->comment->getActorType() !== 'users' + if($this->comment->getActorType() !== 'users' || is_null($user) || $this->comment->getActorId() !== $user->getUID() ) { diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 40075f68a73..125935fce5e 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -512,7 +512,7 @@ class File extends Node implements IFile { $bytesWritten = $chunk_handler->store($info['index'], $data); //detect aborted upload - if (isset ($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PUT') { + if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PUT') { if (isset($_SERVER['CONTENT_LENGTH'])) { $expected = (int)$_SERVER['CONTENT_LENGTH']; if ($bytesWritten !== $expected) { diff --git a/apps/dav/lib/DAV/Sharing/Plugin.php b/apps/dav/lib/DAV/Sharing/Plugin.php index fec26f145ad..f0c2b82ccbf 100644 --- a/apps/dav/lib/DAV/Sharing/Plugin.php +++ b/apps/dav/lib/DAV/Sharing/Plugin.php @@ -149,7 +149,7 @@ class Plugin extends ServerPlugin { // Dealing with the 'share' document, which modified invitees on a // calendar. - case '{' . self::NS_OWNCLOUD . '}share' : + case '{' . self::NS_OWNCLOUD . '}share': // We can only deal with IShareableCalendar objects if (!$node instanceof IShareable) { diff --git a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php index b95c978cf1a..c63bb4fe1d1 100644 --- a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php +++ b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php @@ -59,7 +59,7 @@ class ShareRequest implements XmlDeserializable { foreach ($elements as $elem) { switch ($elem['name']) { - case '{' . Plugin::NS_OWNCLOUD . '}set' : + case '{' . Plugin::NS_OWNCLOUD . '}set': $sharee = $elem['value']; $sumElem = '{' . Plugin::NS_OWNCLOUD . '}summary'; @@ -73,7 +73,7 @@ class ShareRequest implements XmlDeserializable { ]; break; - case '{' . Plugin::NS_OWNCLOUD . '}remove' : + case '{' . Plugin::NS_OWNCLOUD . '}remove': $remove[] = $elem['value']['{DAV:}href']; break; diff --git a/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php b/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php index 712a18d5dbc..bb74884419a 100644 --- a/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php @@ -189,7 +189,7 @@ class SystemTagsObjectMappingCollection implements ICollection { } /** - * Create a sabre node for the mapping of the + * Create a sabre node for the mapping of the * given system tag to the collection's object * * @param ISystemTag $tag diff --git a/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php b/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php index ca9a72b6a90..ff0409c7ea0 100644 --- a/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php @@ -80,7 +80,7 @@ class SystemTagsObjectTypeCollection implements ICollection { * @param \Closure $childExistsFunction */ public function __construct( - $objectType, + $objectType, ISystemTagManager $tagManager, ISystemTagObjectMapper $tagMapper, IUserSession $userSession, diff --git a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php index 53e1b8d0c8f..a666aec95a7 100644 --- a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php +++ b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php @@ -192,7 +192,7 @@ class IMipPluginTest extends TestCase { ->with('dav', 'invitation_link_recipients', 'yes') ->willReturn('yes'); - $message = $this->_testMessage( $veventParams ); + $message = $this->_testMessage($veventParams); $this->_expectSend('frodo@hobb.it', $expectsMail, $expectsMail); @@ -274,8 +274,8 @@ class IMipPluginTest extends TestCase { 'SUMMARY' => 'Fellowship meeting', 'DTSTART' => new \DateTime('2018-01-01 00:00:00') ], $attrs)); - $message->message->VEVENT->add( 'ORGANIZER', 'mailto:gandalf@wiz.ard' ); - $message->message->VEVENT->add( 'ATTENDEE', 'mailto:'.$recipient, [ 'RSVP' => 'TRUE' ] ); + $message->message->VEVENT->add('ORGANIZER', 'mailto:gandalf@wiz.ard'); + $message->message->VEVENT->add('ATTENDEE', 'mailto:'.$recipient, [ 'RSVP' => 'TRUE' ]); $message->sender = 'mailto:gandalf@wiz.ard'; $message->senderName = 'Mr. Wizard'; $message->recipient = 'mailto:'.$recipient; diff --git a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php index 24fc561cd9a..ec80d916b58 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php @@ -573,7 +573,7 @@ class SystemTagPluginTest extends \Test\TestCase { $request->expects($this->once()) ->method('getHeader') ->with('Content-Type') - ->willReturn('application/json'); + ->willReturn('application/json'); $request->expects($this->once()) ->method('getUrl') @@ -647,7 +647,7 @@ class SystemTagPluginTest extends \Test\TestCase { $request->expects($this->once()) ->method('getHeader') ->with('Content-Type') - ->willReturn('application/json'); + ->willReturn('application/json'); $request->expects($this->once()) ->method('getBaseUrl') @@ -744,7 +744,7 @@ class SystemTagPluginTest extends \Test\TestCase { $request->expects($this->once()) ->method('getHeader') ->with('Content-Type') - ->willReturn('application/json'); + ->willReturn('application/json'); $this->plugin->httpPost($request, $response); } diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php index 35a81a03d31..c8482ffe77a 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php @@ -62,7 +62,7 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase { } public function getNode() { - return new \OCA\DAV\SystemTag\SystemTagsObjectMappingCollection ( + return new \OCA\DAV\SystemTag\SystemTagsObjectMappingCollection( 111, 'files', $this->user, diff --git a/apps/encryption/lib/Controller/RecoveryController.php b/apps/encryption/lib/Controller/RecoveryController.php index 5cc5456844b..534e00e1b2e 100644 --- a/apps/encryption/lib/Controller/RecoveryController.php +++ b/apps/encryption/lib/Controller/RecoveryController.php @@ -121,7 +121,7 @@ class RecoveryController extends Controller { if (empty($newPassword)) { $errorMessage = (string)$this->l->t('Please provide a new recovery password'); - return new DataResponse (['data' => ['message' => $errorMessage]], Http::STATUS_BAD_REQUEST); + return new DataResponse(['data' => ['message' => $errorMessage]], Http::STATUS_BAD_REQUEST); } if (empty($confirmPassword)) { diff --git a/apps/encryption/lib/Controller/StatusController.php b/apps/encryption/lib/Controller/StatusController.php index fdd6de78e70..d3925e4482a 100644 --- a/apps/encryption/lib/Controller/StatusController.php +++ b/apps/encryption/lib/Controller/StatusController.php @@ -70,7 +70,7 @@ class StatusController extends Controller { $status = 'error'; $message = 'no valid init status'; - switch( $this->session->getStatus()) { + switch($this->session->getStatus()) { case Session::INIT_EXECUTED: $status = 'interactionNeeded'; $message = (string)$this->l->t( diff --git a/apps/encryption/lib/Crypto/EncryptAll.php b/apps/encryption/lib/Crypto/EncryptAll.php index 5c90631e85f..d0aaafd0617 100644 --- a/apps/encryption/lib/Crypto/EncryptAll.php +++ b/apps/encryption/lib/Crypto/EncryptAll.php @@ -473,11 +473,11 @@ class EncryptAll { protected function createMailBody($password) { $html = new \OC_Template("encryption", "mail", ""); - $html->assign ('password', $password); + $html->assign('password', $password); $htmlMail = $html->fetchPage(); $plainText = new \OC_Template("encryption", "altmail", ""); - $plainText->assign ('password', $password); + $plainText->assign('password', $password); $plainTextMail = $plainText->fetchPage(); return [$htmlMail, $plainTextMail]; diff --git a/apps/encryption/templates/altmail.php b/apps/encryption/templates/altmail.php index dde85e0af14..bea416f05fd 100644 --- a/apps/encryption/templates/altmail.php +++ b/apps/encryption/templates/altmail.php @@ -3,7 +3,7 @@ /** @var array $_ */ print_unescaped($l->t("Hey there,\n\nthe admin enabled server-side-encryption. Your files were encrypted using the password '%s'.\n\nPlease login to the web interface, go to the section 'basic encryption module' of your personal settings and update your encryption password by entering this password into the 'old log-in password' field and your current login-password.\n\n", [$_['password']])); -if ( isset($_['expiration']) ) { +if (isset($_['expiration'])) { print_unescaped($l->t("The share will expire on %s.", [$_['expiration']])); print_unescaped("\n\n"); } diff --git a/apps/encryption/templates/settings-admin.php b/apps/encryption/templates/settings-admin.php index 39d10490c44..48cc4d40da8 100644 --- a/apps/encryption/templates/settings-admin.php +++ b/apps/encryption/templates/settings-admin.php @@ -13,7 +13,7 @@ style('encryption', 'settings-admin'); <input type="checkbox" class="checkbox" name="encrypt_home_storage" id="encryptHomeStorage" value="1" <?php if ($_['encryptHomeStorage']) print_unescaped('checked="checked"'); ?> /> <label for="encryptHomeStorage"><?php p($l->t('Encrypt the home storage'));?></label></br> - <em><?php p( $l->t( "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" ) ); ?></em> + <em><?php p($l->t("Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted")); ?></em> </p> <br /> <?php if($_['masterKeyEnabled'] === false): ?> diff --git a/apps/encryption/templates/settings-personal.php b/apps/encryption/templates/settings-personal.php index 41dacc534e6..23886b7c824 100644 --- a/apps/encryption/templates/settings-personal.php +++ b/apps/encryption/templates/settings-personal.php @@ -6,49 +6,49 @@ script('encryption', 'settings-personal'); <form id="ocDefaultEncryptionModule" class="section"> <h2 data-anchor-name="basic-encryption-module"><?php p($l->t('Basic encryption module')); ?></h2> - <?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED ): ?> + <?php if ($_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED): ?> <?php p($l->t("Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again.")); ?> - <?php elseif ( $_["initialized"] === \OCA\Encryption\Session::INIT_EXECUTED ): ?> + <?php elseif ($_["initialized"] === \OCA\Encryption\Session::INIT_EXECUTED): ?> <p> <a name="changePKPasswd" /> <label for="changePrivateKeyPasswd"> - <em><?php p( $l->t( "Your private key password no longer matches your log-in password." ) ); ?></em> + <em><?php p($l->t("Your private key password no longer matches your log-in password.")); ?></em> </label> <br /> - <?php p( $l->t( "Set your old private key password to your current log-in password:" ) ); ?> - <?php if ( $_["recoveryEnabledForUser"] ): - p( $l->t( " If you don't remember your old password you can ask your administrator to recover your files." ) ); + <?php p($l->t("Set your old private key password to your current log-in password:")); ?> + <?php if ($_["recoveryEnabledForUser"]): + p($l->t(" If you don't remember your old password you can ask your administrator to recover your files.")); endif; ?> <br /> <input type="password" name="changePrivateKeyPassword" id="oldPrivateKeyPassword" /> - <label for="oldPrivateKeyPassword"><?php p($l->t( "Old log-in password" )); ?></label> + <label for="oldPrivateKeyPassword"><?php p($l->t("Old log-in password")); ?></label> <br /> <input type="password" name="changePrivateKeyPassword" id="newPrivateKeyPassword" /> - <label for="newRecoveryPassword"><?php p($l->t( "Current log-in password" )); ?></label> + <label for="newRecoveryPassword"><?php p($l->t("Current log-in password")); ?></label> <br /> <button type="button" name="submitChangePrivateKeyPassword" - disabled><?php p($l->t( "Update Private Key Password" )); ?> + disabled><?php p($l->t("Update Private Key Password")); ?> </button> <span class="msg"></span> </p> - <?php elseif ( $_["recoveryEnabled"] && $_["privateKeySet"] && $_["initialized"] === \OCA\Encryption\Session::INIT_SUCCESSFUL ): ?> + <?php elseif ($_["recoveryEnabled"] && $_["privateKeySet"] && $_["initialized"] === \OCA\Encryption\Session::INIT_SUCCESSFUL): ?> <br /> <p id="userEnableRecovery"> - <label for="userEnableRecovery"><?php p( $l->t( "Enable password recovery:" ) ); ?></label> + <label for="userEnableRecovery"><?php p($l->t("Enable password recovery:")); ?></label> <span class="msg"></span> <br /> - <em><?php p( $l->t( "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" ) ); ?></em> + <em><?php p($l->t("Enabling this option will allow you to reobtain access to your encrypted files in case of password loss")); ?></em> <br /> <input type="radio" @@ -56,8 +56,8 @@ script('encryption', 'settings-personal'); id="userEnableRecoveryCheckbox" name="userEnableRecovery" value="1" - <?php echo ( $_["recoveryEnabledForUser"] ? 'checked="checked"' : '' ); ?> /> - <label for="userEnableRecoveryCheckbox"><?php p( $l->t( "Enabled" ) ); ?></label> + <?php echo($_["recoveryEnabledForUser"] ? 'checked="checked"' : ''); ?> /> + <label for="userEnableRecoveryCheckbox"><?php p($l->t("Enabled")); ?></label> <br /> <input @@ -66,8 +66,8 @@ script('encryption', 'settings-personal'); id="userDisableRecoveryCheckbox" name="userEnableRecovery" value="0" - <?php echo ( $_["recoveryEnabledForUser"] === false ? 'checked="checked"' : '' ); ?> /> - <label for="userDisableRecoveryCheckbox"><?php p( $l->t( "Disabled" ) ); ?></label> + <?php echo($_["recoveryEnabledForUser"] === false ? 'checked="checked"' : ''); ?> /> + <label for="userDisableRecoveryCheckbox"><?php p($l->t("Disabled")); ?></label> </p> <?php endif; ?> </form> diff --git a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php index bf2948b0f64..b46fab19449 100644 --- a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php +++ b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php @@ -146,7 +146,7 @@ class MountPublicLinkController extends Controller { $storedPassword = $share->getPassword(); $authenticated = $this->session->get('public_link_authenticated') === $share->getId() || $this->shareManager->checkPassword($share, $password); - if (!empty($storedPassword) && !$authenticated ) { + if (!empty($storedPassword) && !$authenticated) { $response = new JSONResponse( ['message' => 'No permission to access the share'], Http::STATUS_BAD_REQUEST diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php index 38d4b1cc979..f628ed2e0e0 100644 --- a/apps/files/lib/Command/Scan.php +++ b/apps/files/lib/Command/Scan.php @@ -173,7 +173,7 @@ class Scan extends Base { $inputPath = $input->getOption('path'); if ($inputPath) { $inputPath = '/' . trim($inputPath, '/'); - list (, $user,) = explode('/', $inputPath, 3); + list(, $user,) = explode('/', $inputPath, 3); $users = [$user]; } else if ($input->getOption('all')) { $users = $this->userManager->search(''); diff --git a/apps/files/list.php b/apps/files/list.php index 7d7fc7f105e..e4713ae2960 100644 --- a/apps/files/list.php +++ b/apps/files/list.php @@ -37,4 +37,3 @@ $tmpl = new OCP\Template('files', 'list', ''); $tmpl->assign('showgridview', $showgridview && !$isIE); $tmpl->assign('publicUploadEnabled', $publicUploadEnabled); $tmpl->printPage(); - diff --git a/apps/files/simplelist.php b/apps/files/simplelist.php index 7bb6fb34558..eebb5beb51f 100644 --- a/apps/files/simplelist.php +++ b/apps/files/simplelist.php @@ -35,4 +35,3 @@ $tmpl = new OCP\Template('files', 'simplelist', ''); // gridview not available for ie $tmpl->assign('showgridview', $showgridview && !$isIE); $tmpl->printPage(); - diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php index 697a0a9cf44..ff23c1aee95 100644 --- a/apps/files/templates/list.php +++ b/apps/files/templates/list.php @@ -44,7 +44,7 @@ <th id='headerName' class="hidden column-name"> <div id="headerName-container"> <a class="name sort columntitle" data-sort="name"> - <span><?php p($l->t( 'Name' )); ?></span> + <span><?php p($l->t('Name')); ?></span> <span class="sort-indicator"></span> </a> @@ -60,7 +60,7 @@ <a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a> </th> <th id="headerDate" class="hidden column-mtime"> - <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Modified' )); ?></span><span class="sort-indicator"></span></a> + <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a> </th> </tr> </thead> diff --git a/apps/files/templates/simplelist.php b/apps/files/templates/simplelist.php index 9fd9c49c9c3..ee07cd0955c 100644 --- a/apps/files/templates/simplelist.php +++ b/apps/files/templates/simplelist.php @@ -18,14 +18,14 @@ <tr> <th id='headerName' class="hidden column-name"> <div id="headerName-container"> - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a> + <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> </div> </th> <th id="headerSize" class="hidden column-size"> <a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a> </th> <th id="headerDate" class="hidden column-mtime"> - <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Modified' )); ?></span><span class="sort-indicator"></span></a> + <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a> <span class="selectedActions"> <a href="" class="delete-selected"> <img class="svg" alt="" diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php index de4d001fc4a..0015f3008ef 100644 --- a/apps/files_external/lib/Lib/Storage/FTP.php +++ b/apps/files_external/lib/Lib/Storage/FTP.php @@ -56,7 +56,7 @@ class FTP extends StreamWrapper{ $this->secure = false; } $this->root=isset($params['root'])?$params['root']:'/'; - if ( ! $this->root || $this->root[0]!=='/') { + if (! $this->root || $this->root[0]!=='/') { $this->root='/'.$this->root; } if (substr($this->root, -1) !== '/') { diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index acc4042f21b..ee848889c39 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -371,7 +371,7 @@ class SFTP extends \OC\Files\Storage\Common { switch($mode) { case 'r': case 'rb': - if ( !$this->file_exists($path)) { + if (!$this->file_exists($path)) { return false; } SFTPReadStream::register(); diff --git a/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php b/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php index cb693f82f71..b5bc3ab667d 100644 --- a/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php +++ b/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php @@ -180,4 +180,3 @@ class SFTPWriteStream implements File { } } - diff --git a/apps/files_external/templates/list.php b/apps/files_external/templates/list.php index 04b7159cfe1..e1b666c14c1 100644 --- a/apps/files_external/templates/list.php +++ b/apps/files_external/templates/list.php @@ -16,7 +16,7 @@ <tr> <th id='headerName' class="hidden column-name"> <div id="headerName-container"> - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a> + <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> </div> </th> <th id="headerBackend" class="hidden column-backend"> diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 04c33f73b8b..0142b206b3e 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -1,10 +1,10 @@ <?php use \OCA\Files_External\Lib\Backend\Backend; - use \OCA\Files_External\Lib\Auth\AuthMechanism; - use \OCA\Files_External\Lib\DefinitionParameter; - use \OCA\Files_External\Service\BackendService; +use \OCA\Files_External\Lib\Auth\AuthMechanism; +use \OCA\Files_External\Lib\DefinitionParameter; +use \OCA\Files_External\Service\BackendService; - $canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN || $_['allowUserMounting']; +$canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN || $_['allowUserMounting']; $l->t("Enable encryption"); $l->t("Enable previews"); @@ -142,7 +142,7 @@ }); ?> <?php foreach ($sortedBackends as $backend): ?> - <?php if ($backend->getDeprecateTo()) continue; // ignore deprecated backends ?> + <?php if ($backend->getDeprecateTo()) continue; // ignore deprecated backends?> <option value="<?php p($backend->getIdentifier()); ?>"><?php p($backend->getText()); ?></option> <?php endforeach; ?> </select> diff --git a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php index 947e1fd60ee..bc831b1e95c 100644 --- a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php @@ -267,7 +267,7 @@ class GlobalStoragesServiceTest extends StoragesServiceTest { ], ], ], - // mixed groups and users + // mixed groups and users [ ['user1', 'user2'], ['group1', 'group2'], diff --git a/apps/files_external/tests/Storage/Amazons3Test.php b/apps/files_external/tests/Storage/Amazons3Test.php index 0137ff919f2..0e9ec3dbaa6 100644 --- a/apps/files_external/tests/Storage/Amazons3Test.php +++ b/apps/files_external/tests/Storage/Amazons3Test.php @@ -45,7 +45,7 @@ class Amazons3Test extends \Test\Files\Storage\Storage { parent::setUp(); $this->config = include('files_external/tests/config.amazons3.php'); - if ( ! is_array($this->config) or ! $this->config['run']) { + if (! is_array($this->config) or ! $this->config['run']) { $this->markTestSkipped('AmazonS3 backend not configured'); } $this->instance = new AmazonS3($this->config); diff --git a/apps/files_external/tests/Storage/FtpTest.php b/apps/files_external/tests/Storage/FtpTest.php index c4c947d6080..904b46c283a 100644 --- a/apps/files_external/tests/Storage/FtpTest.php +++ b/apps/files_external/tests/Storage/FtpTest.php @@ -47,7 +47,7 @@ class FtpTest extends \Test\Files\Storage\Storage { $id = $this->getUniqueID(); $this->config = include('files_external/tests/config.ftp.php'); - if ( ! is_array($this->config) or ! $this->config['run']) { + if (! is_array($this->config) or ! $this->config['run']) { $this->markTestSkipped('FTP backend not configured'); } $this->config['root'] .= '/' . $id; //make sure we have an new empty folder to work in diff --git a/apps/files_external/tests/Storage/OwncloudTest.php b/apps/files_external/tests/Storage/OwncloudTest.php index 80c5425dd35..0f63709614d 100644 --- a/apps/files_external/tests/Storage/OwncloudTest.php +++ b/apps/files_external/tests/Storage/OwncloudTest.php @@ -45,7 +45,7 @@ class OwncloudTest extends \Test\Files\Storage\Storage { $id = $this->getUniqueID(); $this->config = include('files_external/tests/config.php'); - if ( ! is_array($this->config) or ! isset($this->config['owncloud']) or ! $this->config['owncloud']['run']) { + if (! is_array($this->config) or ! isset($this->config['owncloud']) or ! $this->config['owncloud']['run']) { $this->markTestSkipped('Nextcloud backend not configured'); } $this->config['owncloud']['root'] .= '/' . $id; //make sure we have an new empty folder to work in diff --git a/apps/files_external/tests/Storage/SFTP_KeyTest.php b/apps/files_external/tests/Storage/SFTP_KeyTest.php index b1ae0fc2a8e..b60e0f8ec59 100644 --- a/apps/files_external/tests/Storage/SFTP_KeyTest.php +++ b/apps/files_external/tests/Storage/SFTP_KeyTest.php @@ -44,7 +44,7 @@ class SFTP_KeyTest extends \Test\Files\Storage\Storage { $id = $this->getUniqueID(); $this->config = include('files_external/tests/config.php'); - if ( ! is_array($this->config) or ! isset($this->config['sftp_key']) or ! $this->config['sftp_key']['run']) { + if (! is_array($this->config) or ! isset($this->config['sftp_key']) or ! $this->config['sftp_key']['run']) { $this->markTestSkipped('SFTP with key backend not configured'); } // Make sure we have an new empty folder to work in diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index 1cf798c9750..48914e27771 100644 --- a/apps/files_sharing/lib/Controller/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -425,7 +425,7 @@ class ShareController extends AuthPublicShareController { $shareTmpl['previewURL'] = $shareTmpl['downloadURL']; if ($shareTmpl['previewSupported']) { - $shareTmpl['previewImage'] = $this->urlGenerator->linkToRouteAbsolute( 'files_sharing.PublicPreview.getPreview', + $shareTmpl['previewImage'] = $this->urlGenerator->linkToRouteAbsolute('files_sharing.PublicPreview.getPreview', ['x' => 200, 'y' => 200, 'file' => $shareTmpl['directory_path'], 'token' => $shareTmpl['dirToken']]); $ogPreview = $shareTmpl['previewImage']; diff --git a/apps/files_sharing/lib/Exceptions/SharingRightsException.php b/apps/files_sharing/lib/Exceptions/SharingRightsException.php index 868ead81e7f..02d197d4034 100644 --- a/apps/files_sharing/lib/Exceptions/SharingRightsException.php +++ b/apps/files_sharing/lib/Exceptions/SharingRightsException.php @@ -25,7 +25,6 @@ namespace OCA\Files_Sharing\Exceptions; use Exception; - /** * Sharing and Resharing rights. * @@ -36,4 +35,3 @@ use Exception; class SharingRightsException extends Exception { } - diff --git a/apps/files_sharing/templates/list.php b/apps/files_sharing/templates/list.php index 95ba9160a9f..03c097725a1 100644 --- a/apps/files_sharing/templates/list.php +++ b/apps/files_sharing/templates/list.php @@ -15,14 +15,14 @@ <tr> <th id='headerName' class="hidden column-name"> <div id="headerName-container"> - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a> + <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> </div> </th> <th id="headerDate" class="hidden column-mtime"> - <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Share time' )); ?></span><span class="sort-indicator"></span></a> + <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Share time')); ?></span><span class="sort-indicator"></span></a> </th> <th class="hidden column-expiration"> - <a class="columntitle"><span><?php p($l->t( 'Expiration date' )); ?></span></a> + <a class="columntitle"><span><?php p($l->t('Expiration date')); ?></span></a> </th> </tr> </thead> diff --git a/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php b/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php index cf50902d035..b2f5fd7c851 100644 --- a/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php +++ b/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php @@ -109,7 +109,7 @@ class SetPasswordColumnTest extends TestCase { foreach ($allShares as $share) { if ((int)$share['share_type'] === Share::SHARE_TYPE_LINK) { - $this->assertNull( $share['share_with']); + $this->assertNull($share['share_with']); $this->assertSame('shareWith', $share['password']); } else { $this->assertSame('shareWith', $share['share_with']); diff --git a/apps/files_sharing/tests/MountProviderTest.php b/apps/files_sharing/tests/MountProviderTest.php index cd1afb1f6ff..ec52db8542e 100644 --- a/apps/files_sharing/tests/MountProviderTest.php +++ b/apps/files_sharing/tests/MountProviderTest.php @@ -112,9 +112,9 @@ class MountProviderTest extends \Test\TestCase { $this->makeMockShare(2, 100, 'user2', '/share2', 31), ]; $groupShares = [ - $this->makeMockShare(3, 100, 'user2', '/share2', 0), - $this->makeMockShare(4, 101, 'user2', '/share4', 31), - $this->makeMockShare(5, 100, 'user1', '/share4', 31), + $this->makeMockShare(3, 100, 'user2', '/share2', 0), + $this->makeMockShare(4, 101, 'user2', '/share4', 31), + $this->makeMockShare(5, 100, 'user1', '/share4', 31), ]; $roomShares = [ $this->makeMockShare(6, 102, 'user2', '/share6', 0), @@ -180,10 +180,10 @@ class MountProviderTest extends \Test\TestCase { // #0: share as outsider with "group1" and "user1" with same permissions [ [ - [1, 100, 'user2', '/share2', 31], + [1, 100, 'user2', '/share2', 31], ], [ - [2, 100, 'user2', '/share2', 31], + [2, 100, 'user2', '/share2', 31], ], [ // combined, user share has higher priority @@ -193,10 +193,10 @@ class MountProviderTest extends \Test\TestCase { // #1: share as outsider with "group1" and "user1" with different permissions [ [ - [1, 100, 'user2', '/share', 31], + [1, 100, 'user2', '/share', 31], ], [ - [2, 100, 'user2', '/share', 15], + [2, 100, 'user2', '/share', 15], ], [ // use highest permissions @@ -208,8 +208,8 @@ class MountProviderTest extends \Test\TestCase { [ ], [ - [1, 100, 'user2', '/share', 31], - [2, 100, 'user2', '/share', 31], + [1, 100, 'user2', '/share', 31], + [2, 100, 'user2', '/share', 31], ], [ // combined, first group share has higher priority @@ -221,8 +221,8 @@ class MountProviderTest extends \Test\TestCase { [ ], [ - [1, 100, 'user2', '/share', 31], - [2, 100, 'user2', '/share', 15], + [1, 100, 'user2', '/share', 31], + [2, 100, 'user2', '/share', 15], ], [ // use higher permissions @@ -234,7 +234,7 @@ class MountProviderTest extends \Test\TestCase { [ ], [ - [1, 100, 'user1', '/share', 31], + [1, 100, 'user1', '/share', 31], ], [ // no received share since "user1" is the sharer/owner @@ -245,8 +245,8 @@ class MountProviderTest extends \Test\TestCase { [ ], [ - [1, 100, 'user1', '/share', 31], - [2, 100, 'user1', '/share', 15], + [1, 100, 'user1', '/share', 31], + [2, 100, 'user1', '/share', 15], ], [ // no received share since "user1" is the sharer/owner @@ -257,7 +257,7 @@ class MountProviderTest extends \Test\TestCase { [ ], [ - [1, 100, 'user2', '/share', 0], + [1, 100, 'user2', '/share', 0], ], [ // no received share since "user1" opted out @@ -266,10 +266,10 @@ class MountProviderTest extends \Test\TestCase { // #7: share as outsider with "group1" and "user1" where recipient renamed in between [ [ - [1, 100, 'user2', '/share2-renamed', 31], + [1, 100, 'user2', '/share2-renamed', 31], ], [ - [2, 100, 'user2', '/share2', 31], + [2, 100, 'user2', '/share2', 31], ], [ // use target of least recent share @@ -279,10 +279,10 @@ class MountProviderTest extends \Test\TestCase { // #8: share as outsider with "group1" and "user1" where recipient renamed in between [ [ - [2, 100, 'user2', '/share2', 31], + [2, 100, 'user2', '/share2', 31], ], [ - [1, 100, 'user2', '/share2-renamed', 31], + [1, 100, 'user2', '/share2-renamed', 31], ], [ // use target of least recent share diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php index e503e364af9..2bf4be54f6a 100644 --- a/apps/files_trashbin/templates/index.php +++ b/apps/files_trashbin/templates/index.php @@ -29,7 +29,7 @@ </th> <th id='headerName' class="hidden column-name"> <div id="headerName-container"> - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a> + <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> <span id="selectedActionsList" class='selectedActions'> <a href="" class="actions-selected"> <span class="icon icon-more"></span> @@ -39,7 +39,7 @@ </div> </th> <th id="headerDate" class="hidden column-mtime"> - <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Deleted' )); ?></span><span class="sort-indicator"></span></a> + <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Deleted')); ?></span><span class="sort-indicator"></span></a> </th> </tr> </thead> diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php index 09650858392..917b8831c06 100644 --- a/apps/files_versions/appinfo/app.php +++ b/apps/files_versions/appinfo/app.php @@ -22,4 +22,3 @@ */ \OC::$server->query(\OCA\Files_Versions\AppInfo\Application::class); - diff --git a/apps/files_versions/appinfo/routes.php b/apps/files_versions/appinfo/routes.php index 0149c0d3b0e..7252ddcd22b 100644 --- a/apps/files_versions/appinfo/routes.php +++ b/apps/files_versions/appinfo/routes.php @@ -46,4 +46,3 @@ $this->create('files_versions_ajax_getVersions', 'ajax/getVersions.php') ->actionInclude('files_versions/ajax/getVersions.php'); $this->create('files_versions_ajax_rollbackVersion', 'ajax/rollbackVersion.php') ->actionInclude('files_versions/ajax/rollbackVersion.php'); - diff --git a/apps/files_versions/lib/Expiration.php b/apps/files_versions/lib/Expiration.php index d57bc20dc81..a56042e76b8 100644 --- a/apps/files_versions/lib/Expiration.php +++ b/apps/files_versions/lib/Expiration.php @@ -129,7 +129,7 @@ class Expiration { } /** - * Read versions_retention_obligation, validate it + * Read versions_retention_obligation, validate it * and set private members accordingly */ private function parseRetentionObligation() { diff --git a/apps/files_versions/lib/Listener/LoadAdditionalListener.php b/apps/files_versions/lib/Listener/LoadAdditionalListener.php index 0d8c380915c..f6d67341074 100644 --- a/apps/files_versions/lib/Listener/LoadAdditionalListener.php +++ b/apps/files_versions/lib/Listener/LoadAdditionalListener.php @@ -39,7 +39,7 @@ class LoadAdditionalListener implements IEventListener { return; } - // TODO: make sure to only include the sidebar script when + // TODO: make sure to only include the sidebar script when // we properly split it between files list and sidebar Util::addScript(Application::APP_ID, 'files_versions'); } diff --git a/apps/files_versions/lib/Listener/LoadSidebarListener.php b/apps/files_versions/lib/Listener/LoadSidebarListener.php index ac877620e71..875fe8b3fc5 100644 --- a/apps/files_versions/lib/Listener/LoadSidebarListener.php +++ b/apps/files_versions/lib/Listener/LoadSidebarListener.php @@ -39,7 +39,7 @@ class LoadSidebarListener implements IEventListener { return; } - // TODO: make sure to only include the sidebar script when + // TODO: make sure to only include the sidebar script when // we properly split it between files list and sidebar Util::addScript(Application::APP_ID, 'files_versions'); } diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php index 1c4e424ec78..8150089c078 100644 --- a/apps/files_versions/lib/Storage.php +++ b/apps/files_versions/lib/Storage.php @@ -107,7 +107,7 @@ class Storage { $uid = User::getUser(); } Filesystem::initMountPoints($uid); - if ( $uid !== User::getUser() ) { + if ($uid !== User::getUser()) { $info = Filesystem::getFileInfo($filename); $ownerView = new View('/'.$uid.'/files'); try { @@ -735,7 +735,7 @@ class Storage { $softQuota = true; $quota = $user->getQuota(); - if ( $quota === null || $quota === 'none' ) { + if ($quota === null || $quota === 'none') { $quota = Filesystem::free_space('/'); $softQuota = false; } else { diff --git a/apps/oauth2/lib/Controller/OauthApiController.php b/apps/oauth2/lib/Controller/OauthApiController.php index 6e12132ed0f..91dd1b948cf 100644 --- a/apps/oauth2/lib/Controller/OauthApiController.php +++ b/apps/oauth2/lib/Controller/OauthApiController.php @@ -99,7 +99,7 @@ class OauthApiController extends Controller { } // We handle the initial and refresh tokens the same way - if ($grant_type === 'refresh_token' ) { + if ($grant_type === 'refresh_token') { $code = $refresh_token; } diff --git a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php index 0469fee0f71..70a920b743e 100644 --- a/apps/provisioning_api/tests/Controller/GroupsControllerTest.php +++ b/apps/provisioning_api/tests/Controller/GroupsControllerTest.php @@ -249,7 +249,7 @@ class GroupsControllerTest extends \Test\TestCase { 'disabled' => 11, 'canAdd' => true, 'canRemove' => true - ], + ], [ 'id' => 'group2', 'displayname' => 'group2-name', diff --git a/apps/settings/templates/help.php b/apps/settings/templates/help.php index 02e84052ff4..0eccf78cc90 100644 --- a/apps/settings/templates/help.php +++ b/apps/settings/templates/help.php @@ -1,5 +1,5 @@ <?php -\OC_Util::addStyle( 'settings', "settings" ); +\OC_Util::addStyle('settings', "settings"); ?> <div id="app-navigation"> <ul> diff --git a/apps/settings/templates/settings/admin/overview.php b/apps/settings/templates/settings/admin/overview.php index 5b36f840ad0..9eb6fc1c1f5 100644 --- a/apps/settings/templates/settings/admin/overview.php +++ b/apps/settings/templates/settings/admin/overview.php @@ -51,7 +51,7 @@ <ul class="info hidden"></ul> </div> <p id="postsetupchecks-hint" class="hidden"> - <?php print_unescaped($l->t('Please double check the <a target="_blank" rel="noreferrer noopener" href="%1$s">installation guides ↗</a>, and check for any errors or warnings in the <a href="%2$s">log</a>.', [link_to_docs('admin-install'), \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => 'logging'])] )); ?> + <?php print_unescaped($l->t('Please double check the <a target="_blank" rel="noreferrer noopener" href="%1$s">installation guides ↗</a>, and check for any errors or warnings in the <a href="%2$s">log</a>.', [link_to_docs('admin-install'), \OC::$server->getURLGenerator()->linkToRoute('settings.AdminSettings.index', ['section' => 'logging'])])); ?> </p> <p class="extra-top-margin"> diff --git a/apps/settings/templates/settings/admin/sharing.php b/apps/settings/templates/settings/admin/sharing.php index c7f3ff16b70..0cfbb3e8492 100644 --- a/apps/settings/templates/settings/admin/sharing.php +++ b/apps/settings/templates/settings/admin/sharing.php @@ -44,10 +44,10 @@ <label for="shareapiDefaultInternalExpireDate"><?php p($l->t('Set default expiration date for shares'));?></label><br/> </p> <p id="setDefaultInternalExpireDate" class="double-indent <?php if ($_['shareDefaultInternalExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>"> - <?php p($l->t( 'Expire after ' )); ?> + <?php p($l->t('Expire after ')); ?> <input type="text" name='shareapi_internal_expire_after_n_days' id="shareapiInternalExpireAfterNDays" placeholder="<?php p('7')?>" value='<?php p($_['shareInternalExpireAfterNDays']) ?>' /> - <?php p($l->t( 'days' )); ?> + <?php p($l->t('days')); ?> <input type="checkbox" name="shareapi_internal_enforce_expire_date" id="shareapiInternalEnforceExpireDate" class="checkbox" value="1" <?php if ($_['shareInternalEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> /> <label for="shareapiInternalEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/> @@ -76,10 +76,10 @@ </p> <p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>"> - <?php p($l->t( 'Expire after ' )); ?> + <?php p($l->t('Expire after ')); ?> <input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>" value='<?php p($_['shareExpireAfterNDays']) ?>' /> - <?php p($l->t( 'days' )); ?> + <?php p($l->t('days')); ?> <input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" class="checkbox" value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> /> <label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/> diff --git a/apps/settings/templates/settings/frame.php b/apps/settings/templates/settings/frame.php index e32c4ed2fc9..d6658e9c631 100644 --- a/apps/settings/templates/settings/frame.php +++ b/apps/settings/templates/settings/frame.php @@ -22,7 +22,7 @@ */ style('settings', 'settings'); -script('settings', [ 'settings', 'admin', 'log', 'certificates'] ); +script('settings', [ 'settings', 'admin', 'log', 'certificates']); script('core', 'setupchecks'); script('files', 'jquery.fileupload'); diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php index f00be40b243..86acf8acced 100644 --- a/apps/settings/tests/Controller/CheckSetupControllerTest.php +++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php @@ -970,7 +970,7 @@ class CheckSetupControllerTest extends TestCase { $this->checker ->expects($this->once()) ->method('getResults') - ->willReturn( [ 'core' => [ 'EXTRA_FILE' => ['/testfile' => []], 'INVALID_HASH' => [ '/.idea/workspace.xml' => [ 'expected' => 'f1c5e2630d784bc9cb02d5a28f55d6f24d06dae2a0fee685f3c2521b050955d9d452769f61454c9ddfa9c308146ade10546cfa829794448eaffbc9a04a29d216', 'current' => 'ce08bf30bcbb879a18b49239a9bec6b8702f52452f88a9d32142cad8d2494d5735e6bfa0d8642b2762c62ca5be49f9bf4ec231d4a230559d4f3e2c471d3ea094', ], '/lib/private/integritycheck/checker.php' => [ 'expected' => 'c5a03bacae8dedf8b239997901ba1fffd2fe51271d13a00cc4b34b09cca5176397a89fc27381cbb1f72855fa18b69b6f87d7d5685c3b45aee373b09be54742ea', 'current' => '88a3a92c11db91dec1ac3be0e1c87f862c95ba6ffaaaa3f2c3b8f682187c66f07af3a3b557a868342ef4a271218fe1c1e300c478e6c156c5955ed53c40d06585', ], '/settings/controller/checksetupcontroller.php' => [ 'expected' => '3e1de26ce93c7bfe0ede7c19cb6c93cadc010340225b375607a7178812e9de163179b0dc33809f451e01f491d93f6f5aaca7929685d21594cccf8bda732327c4', 'current' => '09563164f9904a837f9ca0b5f626db56c838e5098e0ccc1d8b935f68fa03a25c5ec6f6b2d9e44a868e8b85764dafd1605522b4af8db0ae269d73432e9a01e63a', ], ], ], 'bookmarks' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'dav' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'encryption' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'federation' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_antivirus' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_drop' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_pdfviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_sharing' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_trashbin' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_versions' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_videoviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'firstrunwizard' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'gitsmart' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'logreader' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature could not get verified.', ], ], 'password_policy' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'provisioning_api' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'sketch' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'threatblock' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'two_factor_auth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_ldap' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_shibboleth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], ]); + ->willReturn([ 'core' => [ 'EXTRA_FILE' => ['/testfile' => []], 'INVALID_HASH' => [ '/.idea/workspace.xml' => [ 'expected' => 'f1c5e2630d784bc9cb02d5a28f55d6f24d06dae2a0fee685f3c2521b050955d9d452769f61454c9ddfa9c308146ade10546cfa829794448eaffbc9a04a29d216', 'current' => 'ce08bf30bcbb879a18b49239a9bec6b8702f52452f88a9d32142cad8d2494d5735e6bfa0d8642b2762c62ca5be49f9bf4ec231d4a230559d4f3e2c471d3ea094', ], '/lib/private/integritycheck/checker.php' => [ 'expected' => 'c5a03bacae8dedf8b239997901ba1fffd2fe51271d13a00cc4b34b09cca5176397a89fc27381cbb1f72855fa18b69b6f87d7d5685c3b45aee373b09be54742ea', 'current' => '88a3a92c11db91dec1ac3be0e1c87f862c95ba6ffaaaa3f2c3b8f682187c66f07af3a3b557a868342ef4a271218fe1c1e300c478e6c156c5955ed53c40d06585', ], '/settings/controller/checksetupcontroller.php' => [ 'expected' => '3e1de26ce93c7bfe0ede7c19cb6c93cadc010340225b375607a7178812e9de163179b0dc33809f451e01f491d93f6f5aaca7929685d21594cccf8bda732327c4', 'current' => '09563164f9904a837f9ca0b5f626db56c838e5098e0ccc1d8b935f68fa03a25c5ec6f6b2d9e44a868e8b85764dafd1605522b4af8db0ae269d73432e9a01e63a', ], ], ], 'bookmarks' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'dav' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'encryption' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'federation' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_antivirus' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_drop' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_pdfviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_sharing' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_trashbin' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_versions' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_videoviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'firstrunwizard' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'gitsmart' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'logreader' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature could not get verified.', ], ], 'password_policy' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'provisioning_api' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'sketch' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'threatblock' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'two_factor_auth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_ldap' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_shibboleth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], ]); $expected = new DataDisplayResponse( 'Technical information diff --git a/apps/settings/tests/Settings/Admin/ServerTest.php b/apps/settings/tests/Settings/Admin/ServerTest.php index 3758d8635de..d066f5c2f49 100644 --- a/apps/settings/tests/Settings/Admin/ServerTest.php +++ b/apps/settings/tests/Settings/Admin/ServerTest.php @@ -40,7 +40,6 @@ use OCP\IDBConnection; use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; - /** * @group DB */ diff --git a/apps/sharebymail/tests/CapabilitiesTest.php b/apps/sharebymail/tests/CapabilitiesTest.php index 56e22f94691..5799e7e9ccb 100644 --- a/apps/sharebymail/tests/CapabilitiesTest.php +++ b/apps/sharebymail/tests/CapabilitiesTest.php @@ -39,9 +39,9 @@ class CapabilitiesTest extends TestCase { public function testGetCapabilities() { $capabilities = [ - 'files_sharing' => + 'files_sharing' => [ - 'sharebymail' => + 'sharebymail' => [ 'enabled' => true, 'upload_files_drop' => ['enabled' => true], diff --git a/apps/systemtags/appinfo/app.php b/apps/systemtags/appinfo/app.php index 3764ff4a88f..e4bf9b91fa4 100644 --- a/apps/systemtags/appinfo/app.php +++ b/apps/systemtags/appinfo/app.php @@ -69,4 +69,3 @@ $eventDispatcher->addListener(MapperEvent::EVENT_UNASSIGN, $mapperListener); 'name' => $l->t('Tags'), ]; }); - diff --git a/apps/systemtags/templates/list.php b/apps/systemtags/templates/list.php index 252199d2fc4..80c20e24eda 100644 --- a/apps/systemtags/templates/list.php +++ b/apps/systemtags/templates/list.php @@ -18,14 +18,14 @@ <tr> <th id='headerName' class="hidden column-name"> <div id="headerName-container"> - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a> + <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> </div> </th> <th id="headerSize" class="hidden column-size"> <a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a> </th> <th id="headerDate" class="hidden column-mtime"> - <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t( 'Modified' )); ?></span><span class="sort-indicator"></span></a> + <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a> </th> </tr> </thead> diff --git a/apps/testing/appinfo/app.php b/apps/testing/appinfo/app.php index ae8f9841b43..48d8da8c20b 100644 --- a/apps/testing/appinfo/app.php +++ b/apps/testing/appinfo/app.php @@ -22,4 +22,3 @@ */ $app = new \OCA\Testing\AppInfo\Application(); - diff --git a/apps/theming/appinfo/app.php b/apps/theming/appinfo/app.php index 114ff60ba53..c942a85bc75 100644 --- a/apps/theming/appinfo/app.php +++ b/apps/theming/appinfo/app.php @@ -57,4 +57,4 @@ $linkToJs = \OC::$server->getURLGenerator()->linkToRoute( 'src' => $linkToJs, 'nonce' => \OC::$server->getContentSecurityPolicyNonceManager()->getNonce() ], '' -);
\ No newline at end of file +); diff --git a/apps/theming/appinfo/routes.php b/apps/theming/appinfo/routes.php index fe7a5a94659..13196662eb0 100644 --- a/apps/theming/appinfo/routes.php +++ b/apps/theming/appinfo/routes.php @@ -84,4 +84,3 @@ return ['routes' => [ 'requirements' => ['image' => '.+'] ], ]]; - diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 76dd0137020..413e2a9e64f 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -198,7 +198,7 @@ class ThemingDefaults extends \OC_Defaults { $divider = ' · '; } } - if($legalLinks !== '' ) { + if($legalLinks !== '') { $footer .= '<br/>' . $legalLinks; } @@ -353,7 +353,7 @@ class ThemingDefaults extends \OC_Defaults { } catch (AppPathNotFoundException $e) {} $route = $this->urlGenerator->linkToRoute('theming.Theming.getManifest'); } - if (strpos($image, 'filetypes/') === 0 && file_exists(\OC::$SERVERROOT . '/core/img/' . $image )) { + if (strpos($image, 'filetypes/') === 0 && file_exists(\OC::$SERVERROOT . '/core/img/' . $image)) { $route = $this->urlGenerator->linkToRoute('theming.Icon.getThemedIcon', ['app' => $app, 'image' => $image]); } diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 81e467cb639..836e1fddb85 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -620,7 +620,7 @@ class Access extends LDAPUtility { // outside of core user management will still cache the user as non-existing. $originalTTL = $this->connection->ldapCacheTTL; $this->connection->setConfiguration(['ldapCacheTTL' => 0]); - if( $intName !== '' + if($intName !== '' && (($isUser && !$this->ncUserManager->userExists($intName)) || (!$isUser && !\OC::$server->getGroupManager()->groupExists($intName)) ) @@ -708,7 +708,7 @@ class Access extends LDAPUtility { foreach($ldapObjects as $ldapObject) { $nameByLDAP = null; - if( isset($ldapObject[$nameAttribute]) + if(isset($ldapObject[$nameAttribute]) && is_array($ldapObject[$nameAttribute]) && isset($ldapObject[$nameAttribute][0]) ) { @@ -1777,7 +1777,7 @@ class Access extends LDAPUtility { if($this->detectUuidAttribute($dn, $isUser, false, $ldapRecord)) { $attr = $this->connection->$uuidAttr; $uuid = isset($ldapRecord[$attr]) ? $ldapRecord[$attr] : $this->readAttribute($dn, $attr); - if( !is_array($uuid) + if(!is_array($uuid) && $uuidOverride !== '' && $this->detectUuidAttribute($dn, $isUser, true, $ldapRecord)) { diff --git a/apps/user_ldap/lib/Configuration.php b/apps/user_ldap/lib/Configuration.php index a04ea638d09..3c6693b151e 100644 --- a/apps/user_ldap/lib/Configuration.php +++ b/apps/user_ldap/lib/Configuration.php @@ -311,7 +311,7 @@ class Configuration { /** * Sets multi-line values as arrays - * + * * @param string $varName name of config-key * @param array|string $value to set */ @@ -387,7 +387,7 @@ class Configuration { /** * Sets a scalar value. - * + * * @param string $varName name of config key * @param mixed $value to set */ diff --git a/apps/user_ldap/lib/Controller/RenewPasswordController.php b/apps/user_ldap/lib/Controller/RenewPasswordController.php index ff60cd3b2f1..cc58f79cbd0 100644 --- a/apps/user_ldap/lib/Controller/RenewPasswordController.php +++ b/apps/user_ldap/lib/Controller/RenewPasswordController.php @@ -54,7 +54,7 @@ class RenewPasswordController extends Controller { * @param IConfig $config * @param IURLGenerator $urlGenerator */ - function __construct($appName, IRequest $request, IUserManager $userManager, + function __construct($appName, IRequest $request, IUserManager $userManager, IConfig $config, IL10N $l10n, ISession $session, IURLGenerator $urlGenerator) { parent::__construct($appName, $request); $this->userManager = $userManager; diff --git a/apps/user_ldap/lib/Helper.php b/apps/user_ldap/lib/Helper.php index 93dc92f334d..595e3c92ec8 100644 --- a/apps/user_ldap/lib/Helper.php +++ b/apps/user_ldap/lib/Helper.php @@ -305,7 +305,7 @@ class Helper { $userBackend = new User_Proxy( $configPrefixes, $ldapWrapper, $ocConfig, $notificationManager, $userSession, $userPluginManager ); - $uid = $userBackend->loginName2UserName($param['uid'] ); + $uid = $userBackend->loginName2UserName($param['uid']); if($uid !== false) { $param['uid'] = $uid; } diff --git a/apps/user_ldap/lib/LDAPProvider.php b/apps/user_ldap/lib/LDAPProvider.php index 1916e10b8cd..75267165cdf 100644 --- a/apps/user_ldap/lib/LDAPProvider.php +++ b/apps/user_ldap/lib/LDAPProvider.php @@ -110,11 +110,11 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport { if(!$result){ throw new \Exception('Translation to LDAP DN unsuccessful'); } - return $result; + return $result; } /** - * Translate a LDAP DN to an internal user name. If there is no mapping between + * Translate a LDAP DN to an internal user name. If there is no mapping between * the DN and the user name, a new one will be created. * @param string $dn LDAP DN * @return string with the internal user name @@ -147,7 +147,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport { } /** - * Return a new LDAP connection resource for the specified user. + * Return a new LDAP connection resource for the specified user. * The connection must be closed manually. * @param string $uid user id * @return resource of the LDAP connection diff --git a/apps/user_ldap/lib/LDAPProviderFactory.php b/apps/user_ldap/lib/LDAPProviderFactory.php index 637b2d4e67b..ec8d0e3254e 100644 --- a/apps/user_ldap/lib/LDAPProviderFactory.php +++ b/apps/user_ldap/lib/LDAPProviderFactory.php @@ -56,7 +56,7 @@ class LDAPProviderFactory implements ILDAPProviderFactory { $dbConnection = $this->serverContainer->getDatabaseConnection(); $userMapping = new UserMapping($dbConnection); return new LDAPProvider($this->serverContainer, new Helper($this->serverContainer->getConfig()), - new DeletedUsersIndex($this->serverContainer->getConfig(), + new DeletedUsersIndex($this->serverContainer->getConfig(), $dbConnection, $userMapping)); } } diff --git a/apps/user_ldap/lib/Migration/UUIDFixGroup.php b/apps/user_ldap/lib/Migration/UUIDFixGroup.php index 618e5c519e7..a101a97a82f 100644 --- a/apps/user_ldap/lib/Migration/UUIDFixGroup.php +++ b/apps/user_ldap/lib/Migration/UUIDFixGroup.php @@ -34,7 +34,7 @@ use OCP\IConfig; class UUIDFixGroup extends UUIDFix { public function __construct(GroupMapping $mapper, LDAP $ldap, IConfig $config, Helper $helper) { $this->mapper = $mapper; - $this->proxy = new User_Proxy($helper->getServerConfigurationPrefixes(true), $ldap, $config, + $this->proxy = new User_Proxy($helper->getServerConfigurationPrefixes(true), $ldap, $config, \OC::$server->getNotificationManager(), \OC::$server->getUserSession(), \OC::$server->query('LDAPUserPluginManager')); } diff --git a/apps/user_ldap/lib/User/Manager.php b/apps/user_ldap/lib/User/Manager.php index 3f3e8cd3be3..c7660a40ba6 100644 --- a/apps/user_ldap/lib/User/Manager.php +++ b/apps/user_ldap/lib/User/Manager.php @@ -130,7 +130,7 @@ class Manager { $this->checkAccess(); $user = new User($uid, $dn, $this->access, $this->ocConfig, $this->ocFilesystem, clone $this->image, $this->ocLog, - $this->avatarManager, $this->userManager, + $this->avatarManager, $this->userManager, $this->notificationManager); $this->usersByDN[$dn] = $user; $this->usersByUid[$uid] = $user; @@ -264,7 +264,7 @@ class Manager { return $this->usersByUid[$id]; } - if($this->access->stringResemblesDN($id) ) { + if($this->access->stringResemblesDN($id)) { $uid = $this->access->dn2username($id); if($uid !== false) { return $this->createAndCache($id, $uid); diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php index ccd40621704..2c038e43285 100644 --- a/apps/user_ldap/lib/User/User.php +++ b/apps/user_ldap/lib/User/User.php @@ -327,12 +327,12 @@ class User { if ($path !== '') { //if attribute's value is an absolute path take this, otherwise append it to data dir //check for / at the beginning or pattern c:\ resp. c:/ - if( '/' !== $path[0] + if('/' !== $path[0] && !(3 < strlen($path) && ctype_alpha($path[0]) && $path[1] === ':' && ('\\' === $path[2] || '/' === $path[2])) ) { $path = $this->config->getSystemValue('datadirectory', - \OC::$SERVERROOT.'/data' ) . '/' . $path; + \OC::$SERVERROOT.'/data') . '/' . $path; } //we need it to store it in the DB as well in case a user gets //deleted so we can clean up afterwards @@ -342,7 +342,7 @@ class User { return $path; } - if( !is_null($attr) + if(!is_null($attr) && $this->config->getAppValue('user_ldap', 'enforce_home_folder_naming_rule', true) ) { // a naming rule attribute is defined, but it doesn't exist for that LDAP user diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php index 0ac3a2bcc40..bbc809481ac 100644 --- a/apps/user_ldap/templates/settings.php +++ b/apps/user_ldap/templates/settings.php @@ -83,7 +83,7 @@ style('user_ldap', 'settings'); <p><label for="ldap_backup_host"><?php p($l->t('Backup (Replica) Host'));?></label><input type="text" id="ldap_backup_host" name="ldap_backup_host" data-default="<?php p($_['ldap_backup_host_default']); ?>" title="<?php p($l->t('Give an optional backup host. It must be a replica of the main LDAP/AD server.'));?>"></p> <p><label for="ldap_backup_port"><?php p($l->t('Backup (Replica) Port'));?></label><input type="number" id="ldap_backup_port" name="ldap_backup_port" data-default="<?php p($_['ldap_backup_port_default']); ?>" /></p> <p><label for="ldap_override_main_server"><?php p($l->t('Disable Main Server'));?></label><input type="checkbox" id="ldap_override_main_server" name="ldap_override_main_server" value="1" data-default="<?php p($_['ldap_override_main_server_default']); ?>" title="<?php p($l->t('Only connect to the replica server.'));?>" /></p> - <p><label for="ldap_turn_off_cert_check"><?php p($l->t('Turn off SSL certificate validation.'));?></label><input type="checkbox" id="ldap_turn_off_cert_check" name="ldap_turn_off_cert_check" title="<?php p($l->t('Not recommended, use it for testing only! If connection only works with this option, import the LDAP server\'s SSL certificate in your %s server.', [$theme->getName()] ));?>" data-default="<?php p($_['ldap_turn_off_cert_check_default']); ?>" value="1"><br/></p> + <p><label for="ldap_turn_off_cert_check"><?php p($l->t('Turn off SSL certificate validation.'));?></label><input type="checkbox" id="ldap_turn_off_cert_check" name="ldap_turn_off_cert_check" title="<?php p($l->t('Not recommended, use it for testing only! If connection only works with this option, import the LDAP server\'s SSL certificate in your %s server.', [$theme->getName()]));?>" data-default="<?php p($_['ldap_turn_off_cert_check_default']); ?>" value="1"><br/></p> <p><label for="ldap_cache_ttl"><?php p($l->t('Cache Time-To-Live'));?></label><input type="number" id="ldap_cache_ttl" name="ldap_cache_ttl" title="<?php p($l->t('in seconds. A change empties the cache.'));?>" data-default="<?php p($_['ldap_cache_ttl_default']); ?>" /></p> </div> <h3><?php p($l->t('Directory Settings'));?></h3> diff --git a/apps/user_ldap/tests/GroupLDAPPluginTest.php b/apps/user_ldap/tests/GroupLDAPPluginTest.php index 73c5271960b..b5d9c40862b 100644 --- a/apps/user_ldap/tests/GroupLDAPPluginTest.php +++ b/apps/user_ldap/tests/GroupLDAPPluginTest.php @@ -152,7 +152,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager = $this->getGroupPluginManager(); $pluginManager->addToGroup('foo', 'bar'); - } + } public function testRemoveFromGroup() { $pluginManager = $this->getGroupPluginManager(); @@ -214,7 +214,7 @@ class GroupLDAPPluginTest extends \Test\TestCase { $pluginManager = $this->getGroupPluginManager(); $pluginManager->countUsersInGroup('foo', 'bar'); - } + } public function testgetGroupDetails() { $pluginManager = $this->getGroupPluginManager(); diff --git a/apps/user_ldap/tests/Group_LDAPTest.php b/apps/user_ldap/tests/Group_LDAPTest.php index a81255c10a9..cf6e2d7bb84 100644 --- a/apps/user_ldap/tests/Group_LDAPTest.php +++ b/apps/user_ldap/tests/Group_LDAPTest.php @@ -194,7 +194,7 @@ class Group_LDAPTest extends TestCase { $ldap = new GroupLDAP($access, $pluginManager); $this->assertEquals($ldap->countUsersInGroup('gid', 'search'),42); - } + } public function testGidNumber2NameSuccess() { $access = $this->getAccessMock(); diff --git a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php index 50c45b49048..33eb1c70d6f 100644 --- a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php +++ b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php @@ -36,7 +36,7 @@ use OCA\User_LDAP\LDAP; * * LDAP must be available via toxiproxy. * - * This test must be run manually. + * This test must be run manually. * */ class ExceptionOnLostConnection { diff --git a/apps/user_ldap/tests/Jobs/CleanUpTest.php b/apps/user_ldap/tests/Jobs/CleanUpTest.php index 75bd6f0b08e..bf4c8b75bac 100644 --- a/apps/user_ldap/tests/Jobs/CleanUpTest.php +++ b/apps/user_ldap/tests/Jobs/CleanUpTest.php @@ -55,7 +55,7 @@ class CleanUpTest extends \Test\TestCase { $args = $this->getMocks(); $args['helper']->expects($this->once()) ->method('haveDisabledConfigurations') - ->willReturn(true ); + ->willReturn(true); $args['ocConfig']->expects($this->never()) ->method('getSystemValue'); diff --git a/apps/user_ldap/tests/UserLDAPPluginTest.php b/apps/user_ldap/tests/UserLDAPPluginTest.php index 58bc63e442f..03557ec174b 100644 --- a/apps/user_ldap/tests/UserLDAPPluginTest.php +++ b/apps/user_ldap/tests/UserLDAPPluginTest.php @@ -153,7 +153,7 @@ class UserLDAPPluginTest extends \Test\TestCase { $pluginManager = $this->getUserPluginManager(); $pluginManager->getHome('foo'); - } + } public function testGetDisplayName() { $pluginManager = $this->getUserPluginManager(); @@ -204,7 +204,7 @@ class UserLDAPPluginTest extends \Test\TestCase { ); $pluginManager->register($plugin); - $pluginManager->setDisplayName('user', 'password'); + $pluginManager->setDisplayName('user', 'password'); } @@ -214,7 +214,7 @@ class UserLDAPPluginTest extends \Test\TestCase { $pluginManager = $this->getUserPluginManager(); $pluginManager->setDisplayName('foo', 'bar'); - } + } public function testCanChangeAvatar() { $pluginManager = $this->getUserPluginManager(); @@ -271,7 +271,7 @@ class UserLDAPPluginTest extends \Test\TestCase { $pluginManager = $this->getUserPluginManager(); $pluginManager->countUsers(); - } + } public function testDeleteUser() { $pluginManager = $this->getUserPluginManager(); |