@@ -29,17 +29,17 @@ |
||
| 29 | 29 | * @since 11.0.0 |
| 30 | 30 | */ |
| 31 | 31 | interface IDeletionFlagSupport { |
| 32 | - /** |
|
| 33 | - * Flag record for deletion. |
|
| 34 | - * @param string $uid user id |
|
| 35 | - * @since 11.0.0 |
|
| 36 | - */ |
|
| 37 | - public function flagRecord($uid); |
|
| 32 | + /** |
|
| 33 | + * Flag record for deletion. |
|
| 34 | + * @param string $uid user id |
|
| 35 | + * @since 11.0.0 |
|
| 36 | + */ |
|
| 37 | + public function flagRecord($uid); |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * Unflag record for deletion. |
|
| 41 | - * @param string $uid user id |
|
| 42 | - * @since 11.0.0 |
|
| 43 | - */ |
|
| 44 | - public function unflagRecord($uid); |
|
| 39 | + /** |
|
| 40 | + * Unflag record for deletion. |
|
| 41 | + * @param string $uid user id |
|
| 42 | + * @since 11.0.0 |
|
| 43 | + */ |
|
| 44 | + public function unflagRecord($uid); |
|
| 45 | 45 | } |
@@ -25,26 +25,26 @@ |
||
| 25 | 25 | * @since 9.2 |
| 26 | 26 | */ |
| 27 | 27 | interface ILockdownManager { |
| 28 | - /** |
|
| 29 | - * Enable the lockdown restrictions |
|
| 30 | - * |
|
| 31 | - * @since 9.2 |
|
| 32 | - */ |
|
| 33 | - public function enable(); |
|
| 28 | + /** |
|
| 29 | + * Enable the lockdown restrictions |
|
| 30 | + * |
|
| 31 | + * @since 9.2 |
|
| 32 | + */ |
|
| 33 | + public function enable(); |
|
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * Set the active token to get the restrictions from and enable the lockdown |
|
| 37 | - * |
|
| 38 | - * @param IToken $token |
|
| 39 | - * @since 9.2 |
|
| 40 | - */ |
|
| 41 | - public function setToken(IToken $token); |
|
| 35 | + /** |
|
| 36 | + * Set the active token to get the restrictions from and enable the lockdown |
|
| 37 | + * |
|
| 38 | + * @param IToken $token |
|
| 39 | + * @since 9.2 |
|
| 40 | + */ |
|
| 41 | + public function setToken(IToken $token); |
|
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * Check whether or not filesystem access is allowed |
|
| 45 | - * |
|
| 46 | - * @return bool |
|
| 47 | - * @since 9.2 |
|
| 48 | - */ |
|
| 49 | - public function canAccessFilesystem(); |
|
| 43 | + /** |
|
| 44 | + * Check whether or not filesystem access is allowed |
|
| 45 | + * |
|
| 46 | + * @return bool |
|
| 47 | + * @since 9.2 |
|
| 48 | + */ |
|
| 49 | + public function canAccessFilesystem(); |
|
| 50 | 50 | } |
@@ -31,11 +31,11 @@ |
||
| 31 | 31 | * @since 5.0.0 |
| 32 | 32 | */ |
| 33 | 33 | interface Share_Backend_Collection extends Share_Backend { |
| 34 | - /** |
|
| 35 | - * Get the sources of the children of the item |
|
| 36 | - * @param string $itemSource |
|
| 37 | - * @return array Returns an array of children each inside an array with the keys: source, target, and file_path if applicable |
|
| 38 | - * @since 5.0.0 |
|
| 39 | - */ |
|
| 40 | - public function getChildren($itemSource); |
|
| 34 | + /** |
|
| 35 | + * Get the sources of the children of the item |
|
| 36 | + * @param string $itemSource |
|
| 37 | + * @return array Returns an array of children each inside an array with the keys: source, target, and file_path if applicable |
|
| 38 | + * @since 5.0.0 |
|
| 39 | + */ |
|
| 40 | + public function getChildren($itemSource); |
|
| 41 | 41 | } |
@@ -26,9 +26,9 @@ |
||
| 26 | 26 | * @since 8.2.0 |
| 27 | 27 | */ |
| 28 | 28 | interface IQueryFunction { |
| 29 | - /** |
|
| 30 | - * @return string |
|
| 31 | - * @since 8.2.0 |
|
| 32 | - */ |
|
| 33 | - public function __toString(); |
|
| 29 | + /** |
|
| 30 | + * @return string |
|
| 31 | + * @since 8.2.0 |
|
| 32 | + */ |
|
| 33 | + public function __toString(); |
|
| 34 | 34 | } |
@@ -26,9 +26,9 @@ |
||
| 26 | 26 | * @since 8.2.0 |
| 27 | 27 | */ |
| 28 | 28 | interface ILiteral { |
| 29 | - /** |
|
| 30 | - * @return string |
|
| 31 | - * @since 8.2.0 |
|
| 32 | - */ |
|
| 33 | - public function __toString(); |
|
| 29 | + /** |
|
| 30 | + * @return string |
|
| 31 | + * @since 8.2.0 |
|
| 32 | + */ |
|
| 33 | + public function __toString(); |
|
| 34 | 34 | } |
@@ -26,9 +26,9 @@ |
||
| 26 | 26 | * @since 8.2.0 |
| 27 | 27 | */ |
| 28 | 28 | interface IParameter { |
| 29 | - /** |
|
| 30 | - * @return string |
|
| 31 | - * @since 8.2.0 |
|
| 32 | - */ |
|
| 33 | - public function __toString(); |
|
| 29 | + /** |
|
| 30 | + * @return string |
|
| 31 | + * @since 8.2.0 |
|
| 32 | + */ |
|
| 33 | + public function __toString(); |
|
| 34 | 34 | } |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | * @since 9.0.0 |
| 85 | 85 | */ |
| 86 | 86 | public function getGroups() { |
| 87 | - return array_map(function ($group) { |
|
| 87 | + return array_map(function($group) { |
|
| 88 | 88 | /** @var \OCP\IGroup $group */ |
| 89 | 89 | return $group->getGID(); |
| 90 | 90 | }, $this->groups); |
@@ -15,76 +15,76 @@ |
||
| 15 | 15 | * @since 9.0.0 |
| 16 | 16 | */ |
| 17 | 17 | class ManagerEvent extends Event { |
| 18 | - /** |
|
| 19 | - * @since 9.0.0 |
|
| 20 | - * @deprecated 22.0.0 |
|
| 21 | - */ |
|
| 22 | - public const EVENT_APP_ENABLE = 'OCP\App\IAppManager::enableApp'; |
|
| 18 | + /** |
|
| 19 | + * @since 9.0.0 |
|
| 20 | + * @deprecated 22.0.0 |
|
| 21 | + */ |
|
| 22 | + public const EVENT_APP_ENABLE = 'OCP\App\IAppManager::enableApp'; |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * @since 9.0.0 |
|
| 26 | - * @deprecated 22.0.0 |
|
| 27 | - */ |
|
| 28 | - public const EVENT_APP_ENABLE_FOR_GROUPS = 'OCP\App\IAppManager::enableAppForGroups'; |
|
| 24 | + /** |
|
| 25 | + * @since 9.0.0 |
|
| 26 | + * @deprecated 22.0.0 |
|
| 27 | + */ |
|
| 28 | + public const EVENT_APP_ENABLE_FOR_GROUPS = 'OCP\App\IAppManager::enableAppForGroups'; |
|
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * @since 9.0.0 |
|
| 32 | - * @deprecated 22.0.0 |
|
| 33 | - */ |
|
| 34 | - public const EVENT_APP_DISABLE = 'OCP\App\IAppManager::disableApp'; |
|
| 30 | + /** |
|
| 31 | + * @since 9.0.0 |
|
| 32 | + * @deprecated 22.0.0 |
|
| 33 | + */ |
|
| 34 | + public const EVENT_APP_DISABLE = 'OCP\App\IAppManager::disableApp'; |
|
| 35 | 35 | |
| 36 | - /** |
|
| 37 | - * @since 9.1.0 |
|
| 38 | - * @deprecated 22.0.0 |
|
| 39 | - */ |
|
| 40 | - public const EVENT_APP_UPDATE = 'OCP\App\IAppManager::updateApp'; |
|
| 36 | + /** |
|
| 37 | + * @since 9.1.0 |
|
| 38 | + * @deprecated 22.0.0 |
|
| 39 | + */ |
|
| 40 | + public const EVENT_APP_UPDATE = 'OCP\App\IAppManager::updateApp'; |
|
| 41 | 41 | |
| 42 | - /** @var string */ |
|
| 43 | - protected $event; |
|
| 44 | - /** @var string */ |
|
| 45 | - protected $appID; |
|
| 46 | - /** @var \OCP\IGroup[]|null */ |
|
| 47 | - protected $groups; |
|
| 42 | + /** @var string */ |
|
| 43 | + protected $event; |
|
| 44 | + /** @var string */ |
|
| 45 | + protected $appID; |
|
| 46 | + /** @var \OCP\IGroup[]|null */ |
|
| 47 | + protected $groups; |
|
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * DispatcherEvent constructor. |
|
| 51 | - * |
|
| 52 | - * @param string $event |
|
| 53 | - * @param $appID |
|
| 54 | - * @param \OCP\IGroup[]|null $groups |
|
| 55 | - * @since 9.0.0 |
|
| 56 | - */ |
|
| 57 | - public function __construct($event, $appID, ?array $groups = null) { |
|
| 58 | - $this->event = $event; |
|
| 59 | - $this->appID = $appID; |
|
| 60 | - $this->groups = $groups; |
|
| 61 | - } |
|
| 49 | + /** |
|
| 50 | + * DispatcherEvent constructor. |
|
| 51 | + * |
|
| 52 | + * @param string $event |
|
| 53 | + * @param $appID |
|
| 54 | + * @param \OCP\IGroup[]|null $groups |
|
| 55 | + * @since 9.0.0 |
|
| 56 | + */ |
|
| 57 | + public function __construct($event, $appID, ?array $groups = null) { |
|
| 58 | + $this->event = $event; |
|
| 59 | + $this->appID = $appID; |
|
| 60 | + $this->groups = $groups; |
|
| 61 | + } |
|
| 62 | 62 | |
| 63 | - /** |
|
| 64 | - * @return string |
|
| 65 | - * @since 9.0.0 |
|
| 66 | - */ |
|
| 67 | - public function getEvent() { |
|
| 68 | - return $this->event; |
|
| 69 | - } |
|
| 63 | + /** |
|
| 64 | + * @return string |
|
| 65 | + * @since 9.0.0 |
|
| 66 | + */ |
|
| 67 | + public function getEvent() { |
|
| 68 | + return $this->event; |
|
| 69 | + } |
|
| 70 | 70 | |
| 71 | - /** |
|
| 72 | - * @return string |
|
| 73 | - * @since 9.0.0 |
|
| 74 | - */ |
|
| 75 | - public function getAppID() { |
|
| 76 | - return $this->appID; |
|
| 77 | - } |
|
| 71 | + /** |
|
| 72 | + * @return string |
|
| 73 | + * @since 9.0.0 |
|
| 74 | + */ |
|
| 75 | + public function getAppID() { |
|
| 76 | + return $this->appID; |
|
| 77 | + } |
|
| 78 | 78 | |
| 79 | - /** |
|
| 80 | - * returns the group Ids |
|
| 81 | - * @return string[] |
|
| 82 | - * @since 9.0.0 |
|
| 83 | - */ |
|
| 84 | - public function getGroups() { |
|
| 85 | - return array_map(function ($group) { |
|
| 86 | - /** @var \OCP\IGroup $group */ |
|
| 87 | - return $group->getGID(); |
|
| 88 | - }, $this->groups); |
|
| 89 | - } |
|
| 79 | + /** |
|
| 80 | + * returns the group Ids |
|
| 81 | + * @return string[] |
|
| 82 | + * @since 9.0.0 |
|
| 83 | + */ |
|
| 84 | + public function getGroups() { |
|
| 85 | + return array_map(function ($group) { |
|
| 86 | + /** @var \OCP\IGroup $group */ |
|
| 87 | + return $group->getGID(); |
|
| 88 | + }, $this->groups); |
|
| 89 | + } |
|
| 90 | 90 | } |
@@ -25,14 +25,14 @@ |
||
| 25 | 25 | namespace OC; |
| 26 | 26 | |
| 27 | 27 | class NaturalSort_DefaultCollator { |
| 28 | - public function compare($a, $b) { |
|
| 29 | - $result = strcasecmp($a, $b); |
|
| 30 | - if ($result === 0) { |
|
| 31 | - if ($a === $b) { |
|
| 32 | - return 0; |
|
| 33 | - } |
|
| 34 | - return ($a > $b) ? -1 : 1; |
|
| 35 | - } |
|
| 36 | - return ($result < 0) ? -1 : 1; |
|
| 37 | - } |
|
| 28 | + public function compare($a, $b) { |
|
| 29 | + $result = strcasecmp($a, $b); |
|
| 30 | + if ($result === 0) { |
|
| 31 | + if ($a === $b) { |
|
| 32 | + return 0; |
|
| 33 | + } |
|
| 34 | + return ($a > $b) ? -1 : 1; |
|
| 35 | + } |
|
| 36 | + return ($result < 0) ? -1 : 1; |
|
| 37 | + } |
|
| 38 | 38 | } |
@@ -23,35 +23,35 @@ |
||
| 23 | 23 | namespace OC\Memcache; |
| 24 | 24 | |
| 25 | 25 | trait CASTrait { |
| 26 | - abstract public function get($key); |
|
| 26 | + abstract public function get($key); |
|
| 27 | 27 | |
| 28 | - abstract public function set($key, $value, $ttl = 0); |
|
| 28 | + abstract public function set($key, $value, $ttl = 0); |
|
| 29 | 29 | |
| 30 | - abstract public function remove($key); |
|
| 30 | + abstract public function remove($key); |
|
| 31 | 31 | |
| 32 | - abstract public function add($key, $value, $ttl = 0); |
|
| 32 | + abstract public function add($key, $value, $ttl = 0); |
|
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * Compare and set |
|
| 36 | - * |
|
| 37 | - * @param string $key |
|
| 38 | - * @param mixed $old |
|
| 39 | - * @param mixed $new |
|
| 40 | - * @return bool |
|
| 41 | - */ |
|
| 42 | - public function cas($key, $old, $new) { |
|
| 43 | - //no native cas, emulate with locking |
|
| 44 | - if ($this->add($key . '_lock', true)) { |
|
| 45 | - if ($this->get($key) === $old) { |
|
| 46 | - $this->set($key, $new); |
|
| 47 | - $this->remove($key . '_lock'); |
|
| 48 | - return true; |
|
| 49 | - } else { |
|
| 50 | - $this->remove($key . '_lock'); |
|
| 51 | - return false; |
|
| 52 | - } |
|
| 53 | - } else { |
|
| 54 | - return false; |
|
| 55 | - } |
|
| 56 | - } |
|
| 34 | + /** |
|
| 35 | + * Compare and set |
|
| 36 | + * |
|
| 37 | + * @param string $key |
|
| 38 | + * @param mixed $old |
|
| 39 | + * @param mixed $new |
|
| 40 | + * @return bool |
|
| 41 | + */ |
|
| 42 | + public function cas($key, $old, $new) { |
|
| 43 | + //no native cas, emulate with locking |
|
| 44 | + if ($this->add($key . '_lock', true)) { |
|
| 45 | + if ($this->get($key) === $old) { |
|
| 46 | + $this->set($key, $new); |
|
| 47 | + $this->remove($key . '_lock'); |
|
| 48 | + return true; |
|
| 49 | + } else { |
|
| 50 | + $this->remove($key . '_lock'); |
|
| 51 | + return false; |
|
| 52 | + } |
|
| 53 | + } else { |
|
| 54 | + return false; |
|
| 55 | + } |
|
| 56 | + } |
|
| 57 | 57 | } |
@@ -41,13 +41,13 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function cas($key, $old, $new) { |
| 43 | 43 | //no native cas, emulate with locking |
| 44 | - if ($this->add($key . '_lock', true)) { |
|
| 44 | + if ($this->add($key.'_lock', true)) { |
|
| 45 | 45 | if ($this->get($key) === $old) { |
| 46 | 46 | $this->set($key, $new); |
| 47 | - $this->remove($key . '_lock'); |
|
| 47 | + $this->remove($key.'_lock'); |
|
| 48 | 48 | return true; |
| 49 | 49 | } else { |
| 50 | - $this->remove($key . '_lock'); |
|
| 50 | + $this->remove($key.'_lock'); |
|
| 51 | 51 | return false; |
| 52 | 52 | } |
| 53 | 53 | } else { |