Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php10
-rw-r--r--apps/dav/lib/CalDAV/Publishing/PublishPlugin.php4
-rw-r--r--apps/dav/lib/CardDAV/CardDavBackend.php10
-rw-r--r--apps/dav/lib/DAV/Sharing/Plugin.php2
-rw-r--r--apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php4
-rw-r--r--lib/private/AppFramework/Http/Request.php6
-rw-r--r--lib/private/Color.php4
-rw-r--r--tests/lib/Group/ManagerTest.php64
8 files changed, 53 insertions, 51 deletions
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/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/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index 41bfbd82506..9b8c0690ba6 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -327,8 +327,8 @@ class Request implements \ArrayAccess, \Countable, IRequest {
// There's a few headers that seem to end up in the top-level
// server array.
switch ($name) {
- case 'CONTENT_TYPE' :
- case 'CONTENT_LENGTH' :
+ case 'CONTENT_TYPE':
+ case 'CONTENT_LENGTH':
case 'REMOTE_ADDR':
if (isset($this->server[$name])) {
return $this->server[$name];
@@ -811,7 +811,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
$encoding = mb_detect_encoding($pathInfo, ['UTF-8', 'ISO-8859-1']);
switch($encoding) {
- case 'ISO-8859-1' :
+ case 'ISO-8859-1':
$pathInfo = utf8_encode($pathInfo);
}
// end copy
diff --git a/lib/private/Color.php b/lib/private/Color.php
index 11f2c4ada46..6238831c41b 100644
--- a/lib/private/Color.php
+++ b/lib/private/Color.php
@@ -24,7 +24,9 @@
namespace OC;
class Color {
- public $r, $g, $b;
+ public $r;
+ public $g;
+ public $b;
public function __construct($r, $g, $b) {
$this->r = $r;
$this->g = $g;
diff --git a/tests/lib/Group/ManagerTest.php b/tests/lib/Group/ManagerTest.php
index c4b56b56fff..9437e62996c 100644
--- a/tests/lib/Group/ManagerTest.php
+++ b/tests/lib/Group/ManagerTest.php
@@ -548,9 +548,9 @@ class ManagerTest extends TestCase {
->method('inGroup')
->willReturnCallback(function ($uid, $gid) {
switch($uid) {
- case 'user1' : return false;
- case 'user2' : return true;
- case 'user3' : return false;
+ case 'user1': return false;
+ case 'user2': return true;
+ case 'user3': return false;
case 'user33': return true;
default:
return null;
@@ -562,9 +562,9 @@ class ManagerTest extends TestCase {
->with('user3')
->willReturnCallback(function ($search, $limit, $offset) {
switch($offset) {
- case 0 : return ['user3' => $this->getTestUser('user3'),
+ case 0: return ['user3' => $this->getTestUser('user3'),
'user33' => $this->getTestUser('user33')];
- case 2 : return [];
+ case 2: return [];
}
return null;
});
@@ -572,9 +572,9 @@ class ManagerTest extends TestCase {
->method('get')
->willReturnCallback(function ($uid) {
switch($uid) {
- case 'user1' : return $this->getTestUser('user1');
- case 'user2' : return $this->getTestUser('user2');
- case 'user3' : return $this->getTestUser('user3');
+ case 'user1': return $this->getTestUser('user1');
+ case 'user2': return $this->getTestUser('user2');
+ case 'user3': return $this->getTestUser('user3');
case 'user33': return $this->getTestUser('user33');
default:
return null;
@@ -606,9 +606,9 @@ class ManagerTest extends TestCase {
->method('inGroup')
->willReturnCallback(function ($uid, $gid) {
switch($uid) {
- case 'user1' : return false;
- case 'user2' : return true;
- case 'user3' : return false;
+ case 'user1': return false;
+ case 'user2': return true;
+ case 'user3': return false;
case 'user33': return true;
case 'user333': return true;
default:
@@ -621,9 +621,9 @@ class ManagerTest extends TestCase {
->with('user3')
->willReturnCallback(function ($search, $limit, $offset) {
switch($offset) {
- case 0 : return ['user3' => $this->getTestUser('user3'),
+ case 0: return ['user3' => $this->getTestUser('user3'),
'user33' => $this->getTestUser('user33')];
- case 2 : return ['user333' => $this->getTestUser('user333')];
+ case 2: return ['user333' => $this->getTestUser('user333')];
}
return null;
});
@@ -631,9 +631,9 @@ class ManagerTest extends TestCase {
->method('get')
->willReturnCallback(function ($uid) {
switch($uid) {
- case 'user1' : return $this->getTestUser('user1');
- case 'user2' : return $this->getTestUser('user2');
- case 'user3' : return $this->getTestUser('user3');
+ case 'user1': return $this->getTestUser('user1');
+ case 'user2': return $this->getTestUser('user2');
+ case 'user3': return $this->getTestUser('user3');
case 'user33': return $this->getTestUser('user33');
case 'user333': return $this->getTestUser('user333');
default:
@@ -667,9 +667,9 @@ class ManagerTest extends TestCase {
->method('inGroup')
->willReturnCallback(function ($uid) {
switch($uid) {
- case 'user1' : return false;
- case 'user2' : return true;
- case 'user3' : return false;
+ case 'user1': return false;
+ case 'user2': return true;
+ case 'user3': return false;
case 'user33': return true;
case 'user333': return true;
default:
@@ -682,7 +682,7 @@ class ManagerTest extends TestCase {
->with('user3')
->willReturnCallback(function ($search, $limit, $offset) {
switch($offset) {
- case 0 :
+ case 0:
return [
'user3' => $this->getTestUser('user3'),
'user33' => $this->getTestUser('user33'),
@@ -695,9 +695,9 @@ class ManagerTest extends TestCase {
->method('get')
->willReturnCallback(function ($uid) {
switch($uid) {
- case 'user1' : return $this->getTestUser('user1');
- case 'user2' : return $this->getTestUser('user2');
- case 'user3' : return $this->getTestUser('user3');
+ case 'user1': return $this->getTestUser('user1');
+ case 'user2': return $this->getTestUser('user2');
+ case 'user3': return $this->getTestUser('user3');
case 'user33': return $this->getTestUser('user33');
case 'user333': return $this->getTestUser('user333');
default:
@@ -736,9 +736,9 @@ class ManagerTest extends TestCase {
->method('get')
->willReturnCallback(function ($uid) {
switch($uid) {
- case 'user1' : return $this->getTestUser('user1');
- case 'user2' : return $this->getTestUser('user2');
- case 'user3' : return $this->getTestUser('user3');
+ case 'user1': return $this->getTestUser('user1');
+ case 'user2': return $this->getTestUser('user2');
+ case 'user3': return $this->getTestUser('user3');
case 'user33': return $this->getTestUser('user33');
default:
return null;
@@ -775,9 +775,9 @@ class ManagerTest extends TestCase {
->method('get')
->willReturnCallback(function ($uid) {
switch($uid) {
- case 'user1' : return $this->getTestUser('user1');
- case 'user2' : return $this->getTestUser('user2');
- case 'user3' : return $this->getTestUser('user3');
+ case 'user1': return $this->getTestUser('user1');
+ case 'user2': return $this->getTestUser('user2');
+ case 'user3': return $this->getTestUser('user3');
case 'user33': return $this->getTestUser('user33');
default:
return null;
@@ -814,9 +814,9 @@ class ManagerTest extends TestCase {
->method('get')
->willReturnCallback(function ($uid) {
switch($uid) {
- case 'user1' : return $this->getTestUser('user1');
- case 'user2' : return $this->getTestUser('user2');
- case 'user3' : return $this->getTestUser('user3');
+ case 'user1': return $this->getTestUser('user1');
+ case 'user2': return $this->getTestUser('user2');
+ case 'user3': return $this->getTestUser('user3');
case 'user33': return $this->getTestUser('user33');
default:
return null;