diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2020-04-09 20:39:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-09 20:39:37 +0200 |
commit | 008e6d7e849a82fdc3aa20169c4c8bdd0fe506be (patch) | |
tree | 6abbe3d8741de956ad787b5e3d55cec85ceb558f /apps/dav | |
parent | 64510932b8bd7d4d1d490f7da7fb9ebcf21e31c2 (diff) | |
parent | 3a415e4139d6e28c16b0420ab411e6df5ff6d54a (diff) | |
download | nextcloud-server-008e6d7e849a82fdc3aa20169c4c8bdd0fe506be.tar.gz nextcloud-server-008e6d7e849a82fdc3aa20169c4c8bdd0fe506be.zip |
Merge pull request #20391 from nextcloud/refactor/spaces-cleanup
Remove all extra whitespace PSR2 does not like
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/CalDAV/CachedSubscription.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 10 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Publishing/PublishPlugin.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/CardDAV/CardDavBackend.php | 10 | ||||
-rw-r--r-- | apps/dav/lib/CardDAV/ImageExportPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Command/MoveCalendar.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Comments/CommentNode.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/File.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/DAV/Sharing/Plugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php | 2 | ||||
-rw-r--r-- | apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php | 6 | ||||
-rw-r--r-- | apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php | 6 | ||||
-rw-r--r-- | apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php | 2 |
15 files changed, 29 insertions, 29 deletions
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, |