Remove space between switch case and colon

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pull/20391/head
Christoph Wurst 6 years ago
parent f4c09f299d
commit 3a415e4139
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
  1. 10
      apps/dav/lib/CalDAV/CalDavBackend.php
  2. 4
      apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
  3. 10
      apps/dav/lib/CardDAV/CardDavBackend.php
  4. 2
      apps/dav/lib/DAV/Sharing/Plugin.php
  5. 4
      apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php
  6. 6
      lib/private/AppFramework/Http/Request.php
  7. 4
      lib/private/Color.php
  8. 64
      tests/lib/Group/ManagerTest.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;
}

@ -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) {

@ -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);
}

@ -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) {

@ -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;

@ -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

@ -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;

@ -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;

Loading…
Cancel
Save