@@ -23,20 +23,20 @@ |
||
| 23 | 23 | |
| 24 | 24 | class CoreBundle extends Bundle { |
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * {@inheritDoc} |
|
| 28 | - */ |
|
| 29 | - public function getName() { |
|
| 30 | - return 'Core bundle'; |
|
| 31 | - } |
|
| 26 | + /** |
|
| 27 | + * {@inheritDoc} |
|
| 28 | + */ |
|
| 29 | + public function getName() { |
|
| 30 | + return 'Core bundle'; |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * {@inheritDoc} |
|
| 35 | - */ |
|
| 36 | - public function getAppIdentifiers() { |
|
| 37 | - return [ |
|
| 38 | - 'bruteforcesettings', |
|
| 39 | - ]; |
|
| 40 | - } |
|
| 33 | + /** |
|
| 34 | + * {@inheritDoc} |
|
| 35 | + */ |
|
| 36 | + public function getAppIdentifiers() { |
|
| 37 | + return [ |
|
| 38 | + 'bruteforcesettings', |
|
| 39 | + ]; |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | 42 | } |
@@ -35,55 +35,55 @@ |
||
| 35 | 35 | * @since 8.0.0 |
| 36 | 36 | */ |
| 37 | 37 | interface IEventLogger { |
| 38 | - /** |
|
| 39 | - * Mark the start of an event setting its ID $id and providing event description $description. |
|
| 40 | - * |
|
| 41 | - * @param string $id |
|
| 42 | - * @param string $description |
|
| 43 | - * @since 8.0.0 |
|
| 44 | - */ |
|
| 45 | - public function start($id, $description); |
|
| 38 | + /** |
|
| 39 | + * Mark the start of an event setting its ID $id and providing event description $description. |
|
| 40 | + * |
|
| 41 | + * @param string $id |
|
| 42 | + * @param string $description |
|
| 43 | + * @since 8.0.0 |
|
| 44 | + */ |
|
| 45 | + public function start($id, $description); |
|
| 46 | 46 | |
| 47 | - /** |
|
| 48 | - * Mark the end of an event with specific ID $id, marked by start() method. |
|
| 49 | - * Ending event should store \OCP\Diagnostics\IEvent to |
|
| 50 | - * be returned with getEvents() method. |
|
| 51 | - * |
|
| 52 | - * @param string $id |
|
| 53 | - * @since 8.0.0 |
|
| 54 | - */ |
|
| 55 | - public function end($id); |
|
| 47 | + /** |
|
| 48 | + * Mark the end of an event with specific ID $id, marked by start() method. |
|
| 49 | + * Ending event should store \OCP\Diagnostics\IEvent to |
|
| 50 | + * be returned with getEvents() method. |
|
| 51 | + * |
|
| 52 | + * @param string $id |
|
| 53 | + * @since 8.0.0 |
|
| 54 | + */ |
|
| 55 | + public function end($id); |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * Mark the start and the end of an event with specific ID $id and description $description, |
|
| 59 | - * explicitly marking start and end of the event, represented by $start and $end timestamps. |
|
| 60 | - * Logging event should store \OCP\Diagnostics\IEvent to |
|
| 61 | - * be returned with getEvents() method. |
|
| 62 | - * |
|
| 63 | - * @param string $id |
|
| 64 | - * @param string $description |
|
| 65 | - * @param float $start |
|
| 66 | - * @param float $end |
|
| 67 | - * @since 8.0.0 |
|
| 68 | - */ |
|
| 69 | - public function log($id, $description, $start, $end); |
|
| 57 | + /** |
|
| 58 | + * Mark the start and the end of an event with specific ID $id and description $description, |
|
| 59 | + * explicitly marking start and end of the event, represented by $start and $end timestamps. |
|
| 60 | + * Logging event should store \OCP\Diagnostics\IEvent to |
|
| 61 | + * be returned with getEvents() method. |
|
| 62 | + * |
|
| 63 | + * @param string $id |
|
| 64 | + * @param string $description |
|
| 65 | + * @param float $start |
|
| 66 | + * @param float $end |
|
| 67 | + * @since 8.0.0 |
|
| 68 | + */ |
|
| 69 | + public function log($id, $description, $start, $end); |
|
| 70 | 70 | |
| 71 | - /** |
|
| 72 | - * This method should return all \OCP\Diagnostics\IEvent objects stored using |
|
| 73 | - * start()/end() or log() methods |
|
| 74 | - * |
|
| 75 | - * @return \OCP\Diagnostics\IEvent[] |
|
| 76 | - * @since 8.0.0 |
|
| 77 | - */ |
|
| 78 | - public function getEvents(); |
|
| 71 | + /** |
|
| 72 | + * This method should return all \OCP\Diagnostics\IEvent objects stored using |
|
| 73 | + * start()/end() or log() methods |
|
| 74 | + * |
|
| 75 | + * @return \OCP\Diagnostics\IEvent[] |
|
| 76 | + * @since 8.0.0 |
|
| 77 | + */ |
|
| 78 | + public function getEvents(); |
|
| 79 | 79 | |
| 80 | - /** |
|
| 81 | - * Activate the module for the duration of the request. Deactivated module |
|
| 82 | - * does not create and store \OCP\Diagnostics\IEvent objects. |
|
| 83 | - * Only activated module should create and store objects to be |
|
| 84 | - * returned with getEvents() call. |
|
| 85 | - * |
|
| 86 | - * @since 12.0.0 |
|
| 87 | - */ |
|
| 88 | - public function activate(); |
|
| 80 | + /** |
|
| 81 | + * Activate the module for the duration of the request. Deactivated module |
|
| 82 | + * does not create and store \OCP\Diagnostics\IEvent objects. |
|
| 83 | + * Only activated module should create and store objects to be |
|
| 84 | + * returned with getEvents() call. |
|
| 85 | + * |
|
| 86 | + * @since 12.0.0 |
|
| 87 | + */ |
|
| 88 | + public function activate(); |
|
| 89 | 89 | } |
@@ -30,38 +30,38 @@ |
||
| 30 | 30 | * @since 8.0.0 |
| 31 | 31 | */ |
| 32 | 32 | interface IQuery { |
| 33 | - /** |
|
| 34 | - * @return string |
|
| 35 | - * @since 8.0.0 |
|
| 36 | - */ |
|
| 37 | - public function getSql(); |
|
| 33 | + /** |
|
| 34 | + * @return string |
|
| 35 | + * @since 8.0.0 |
|
| 36 | + */ |
|
| 37 | + public function getSql(); |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * @return array |
|
| 41 | - * @since 8.0.0 |
|
| 42 | - */ |
|
| 43 | - public function getParams(); |
|
| 39 | + /** |
|
| 40 | + * @return array |
|
| 41 | + * @since 8.0.0 |
|
| 42 | + */ |
|
| 43 | + public function getParams(); |
|
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * @return float |
|
| 47 | - * @since 8.0.0 |
|
| 48 | - */ |
|
| 49 | - public function getDuration(); |
|
| 45 | + /** |
|
| 46 | + * @return float |
|
| 47 | + * @since 8.0.0 |
|
| 48 | + */ |
|
| 49 | + public function getDuration(); |
|
| 50 | 50 | |
| 51 | - /** |
|
| 52 | - * @return float |
|
| 53 | - * @since 11.0.0 |
|
| 54 | - */ |
|
| 55 | - public function getStartTime(); |
|
| 51 | + /** |
|
| 52 | + * @return float |
|
| 53 | + * @since 11.0.0 |
|
| 54 | + */ |
|
| 55 | + public function getStartTime(); |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * @return array |
|
| 59 | - * @since 11.0.0 |
|
| 60 | - */ |
|
| 61 | - public function getStacktrace(); |
|
| 62 | - /** |
|
| 63 | - * @return array |
|
| 64 | - * @since 12.0.0 |
|
| 65 | - */ |
|
| 66 | - public function getStart(); |
|
| 57 | + /** |
|
| 58 | + * @return array |
|
| 59 | + * @since 11.0.0 |
|
| 60 | + */ |
|
| 61 | + public function getStacktrace(); |
|
| 62 | + /** |
|
| 63 | + * @return array |
|
| 64 | + * @since 12.0.0 |
|
| 65 | + */ |
|
| 66 | + public function getStart(); |
|
| 67 | 67 | } |
@@ -26,65 +26,65 @@ |
||
| 26 | 26 | use OCP\Diagnostics\IQuery; |
| 27 | 27 | |
| 28 | 28 | class Query implements IQuery { |
| 29 | - private $sql; |
|
| 29 | + private $sql; |
|
| 30 | 30 | |
| 31 | - private $params; |
|
| 31 | + private $params; |
|
| 32 | 32 | |
| 33 | - private $start; |
|
| 33 | + private $start; |
|
| 34 | 34 | |
| 35 | - private $end; |
|
| 35 | + private $end; |
|
| 36 | 36 | |
| 37 | - private $stack; |
|
| 37 | + private $stack; |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * @param string $sql |
|
| 41 | - * @param array $params |
|
| 42 | - * @param int $start |
|
| 43 | - */ |
|
| 44 | - public function __construct($sql, $params, $start, array $stack) { |
|
| 45 | - $this->sql = $sql; |
|
| 46 | - $this->params = $params; |
|
| 47 | - $this->start = $start; |
|
| 48 | - $this->stack = $stack; |
|
| 49 | - } |
|
| 39 | + /** |
|
| 40 | + * @param string $sql |
|
| 41 | + * @param array $params |
|
| 42 | + * @param int $start |
|
| 43 | + */ |
|
| 44 | + public function __construct($sql, $params, $start, array $stack) { |
|
| 45 | + $this->sql = $sql; |
|
| 46 | + $this->params = $params; |
|
| 47 | + $this->start = $start; |
|
| 48 | + $this->stack = $stack; |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | - public function end($time) { |
|
| 52 | - $this->end = $time; |
|
| 53 | - } |
|
| 51 | + public function end($time) { |
|
| 52 | + $this->end = $time; |
|
| 53 | + } |
|
| 54 | 54 | |
| 55 | - /** |
|
| 56 | - * @return array |
|
| 57 | - */ |
|
| 58 | - public function getParams() { |
|
| 59 | - return $this->params; |
|
| 60 | - } |
|
| 55 | + /** |
|
| 56 | + * @return array |
|
| 57 | + */ |
|
| 58 | + public function getParams() { |
|
| 59 | + return $this->params; |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | - /** |
|
| 63 | - * @return string |
|
| 64 | - */ |
|
| 65 | - public function getSql() { |
|
| 66 | - return $this->sql; |
|
| 67 | - } |
|
| 62 | + /** |
|
| 63 | + * @return string |
|
| 64 | + */ |
|
| 65 | + public function getSql() { |
|
| 66 | + return $this->sql; |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | - /** |
|
| 70 | - * @return float |
|
| 71 | - */ |
|
| 72 | - public function getStart() { |
|
| 73 | - return $this->start; |
|
| 74 | - } |
|
| 69 | + /** |
|
| 70 | + * @return float |
|
| 71 | + */ |
|
| 72 | + public function getStart() { |
|
| 73 | + return $this->start; |
|
| 74 | + } |
|
| 75 | 75 | |
| 76 | - /** |
|
| 77 | - * @return float |
|
| 78 | - */ |
|
| 79 | - public function getDuration() { |
|
| 80 | - return $this->end - $this->start; |
|
| 81 | - } |
|
| 76 | + /** |
|
| 77 | + * @return float |
|
| 78 | + */ |
|
| 79 | + public function getDuration() { |
|
| 80 | + return $this->end - $this->start; |
|
| 81 | + } |
|
| 82 | 82 | |
| 83 | - public function getStartTime() { |
|
| 84 | - return $this->start; |
|
| 85 | - } |
|
| 83 | + public function getStartTime() { |
|
| 84 | + return $this->start; |
|
| 85 | + } |
|
| 86 | 86 | |
| 87 | - public function getStacktrace() { |
|
| 88 | - return $this->stack; |
|
| 89 | - } |
|
| 87 | + public function getStacktrace() { |
|
| 88 | + return $this->stack; |
|
| 89 | + } |
|
| 90 | 90 | } |
@@ -34,20 +34,20 @@ |
||
| 34 | 34 | * @method void setName(string $name) |
| 35 | 35 | */ |
| 36 | 36 | class Client extends Entity { |
| 37 | - /** @var string */ |
|
| 38 | - protected $name; |
|
| 39 | - /** @var string */ |
|
| 40 | - protected $redirectUri; |
|
| 41 | - /** @var string */ |
|
| 42 | - protected $clientIdentifier; |
|
| 43 | - /** @var string */ |
|
| 44 | - protected $secret; |
|
| 37 | + /** @var string */ |
|
| 38 | + protected $name; |
|
| 39 | + /** @var string */ |
|
| 40 | + protected $redirectUri; |
|
| 41 | + /** @var string */ |
|
| 42 | + protected $clientIdentifier; |
|
| 43 | + /** @var string */ |
|
| 44 | + protected $secret; |
|
| 45 | 45 | |
| 46 | - public function __construct() { |
|
| 47 | - $this->addType('id', 'int'); |
|
| 48 | - $this->addType('name', 'string'); |
|
| 49 | - $this->addType('redirect_uri', 'string'); |
|
| 50 | - $this->addType('client_identifier', 'string'); |
|
| 51 | - $this->addType('secret', 'string'); |
|
| 52 | - } |
|
| 46 | + public function __construct() { |
|
| 47 | + $this->addType('id', 'int'); |
|
| 48 | + $this->addType('name', 'string'); |
|
| 49 | + $this->addType('redirect_uri', 'string'); |
|
| 50 | + $this->addType('client_identifier', 'string'); |
|
| 51 | + $this->addType('secret', 'string'); |
|
| 52 | + } |
|
| 53 | 53 | } |
@@ -24,25 +24,25 @@ |
||
| 24 | 24 | namespace OC\Files\Cache\Wrapper; |
| 25 | 25 | |
| 26 | 26 | class CachePermissionsMask extends CacheWrapper { |
| 27 | - /** |
|
| 28 | - * @var int |
|
| 29 | - */ |
|
| 30 | - protected $mask; |
|
| 27 | + /** |
|
| 28 | + * @var int |
|
| 29 | + */ |
|
| 30 | + protected $mask; |
|
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * @param \OCP\Files\Cache\ICache $cache |
|
| 34 | - * @param int $mask |
|
| 35 | - */ |
|
| 36 | - public function __construct($cache, $mask) { |
|
| 37 | - parent::__construct($cache); |
|
| 38 | - $this->mask = $mask; |
|
| 39 | - } |
|
| 32 | + /** |
|
| 33 | + * @param \OCP\Files\Cache\ICache $cache |
|
| 34 | + * @param int $mask |
|
| 35 | + */ |
|
| 36 | + public function __construct($cache, $mask) { |
|
| 37 | + parent::__construct($cache); |
|
| 38 | + $this->mask = $mask; |
|
| 39 | + } |
|
| 40 | 40 | |
| 41 | - protected function formatCacheEntry($entry) { |
|
| 42 | - if (isset($entry['permissions'])) { |
|
| 43 | - $entry['scan_permissions'] = $entry['permissions']; |
|
| 44 | - $entry['permissions'] &= $this->mask; |
|
| 45 | - } |
|
| 46 | - return $entry; |
|
| 47 | - } |
|
| 41 | + protected function formatCacheEntry($entry) { |
|
| 42 | + if (isset($entry['permissions'])) { |
|
| 43 | + $entry['scan_permissions'] = $entry['permissions']; |
|
| 44 | + $entry['permissions'] &= $this->mask; |
|
| 45 | + } |
|
| 46 | + return $entry; |
|
| 47 | + } |
|
| 48 | 48 | } |
@@ -27,45 +27,45 @@ |
||
| 27 | 27 | |
| 28 | 28 | class Config implements \OCP\GlobalScale\IConfig { |
| 29 | 29 | |
| 30 | - /** @var IConfig */ |
|
| 31 | - private $config; |
|
| 30 | + /** @var IConfig */ |
|
| 31 | + private $config; |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Config constructor. |
|
| 35 | - * |
|
| 36 | - * @param IConfig $config |
|
| 37 | - */ |
|
| 38 | - public function __construct(IConfig $config) { |
|
| 39 | - $this->config = $config; |
|
| 40 | - } |
|
| 33 | + /** |
|
| 34 | + * Config constructor. |
|
| 35 | + * |
|
| 36 | + * @param IConfig $config |
|
| 37 | + */ |
|
| 38 | + public function __construct(IConfig $config) { |
|
| 39 | + $this->config = $config; |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * check if global scale is enabled |
|
| 44 | - * |
|
| 45 | - * @since 12.0.1 |
|
| 46 | - * @return bool |
|
| 47 | - */ |
|
| 48 | - public function isGlobalScaleEnabled() { |
|
| 49 | - $enabled = $this->config->getSystemValue('gs.enabled', false); |
|
| 50 | - return $enabled !== false; |
|
| 51 | - } |
|
| 42 | + /** |
|
| 43 | + * check if global scale is enabled |
|
| 44 | + * |
|
| 45 | + * @since 12.0.1 |
|
| 46 | + * @return bool |
|
| 47 | + */ |
|
| 48 | + public function isGlobalScaleEnabled() { |
|
| 49 | + $enabled = $this->config->getSystemValue('gs.enabled', false); |
|
| 50 | + return $enabled !== false; |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | - /** |
|
| 54 | - * check if federation should only be used internally in a global scale setup |
|
| 55 | - * |
|
| 56 | - * @since 12.0.1 |
|
| 57 | - * @return bool |
|
| 58 | - */ |
|
| 59 | - public function onlyInternalFederation() { |
|
| 60 | - // if global scale is disabled federation works always globally |
|
| 61 | - $gsEnabled = $this->isGlobalScaleEnabled(); |
|
| 62 | - if ($gsEnabled === false) { |
|
| 63 | - return false; |
|
| 64 | - } |
|
| 53 | + /** |
|
| 54 | + * check if federation should only be used internally in a global scale setup |
|
| 55 | + * |
|
| 56 | + * @since 12.0.1 |
|
| 57 | + * @return bool |
|
| 58 | + */ |
|
| 59 | + public function onlyInternalFederation() { |
|
| 60 | + // if global scale is disabled federation works always globally |
|
| 61 | + $gsEnabled = $this->isGlobalScaleEnabled(); |
|
| 62 | + if ($gsEnabled === false) { |
|
| 63 | + return false; |
|
| 64 | + } |
|
| 65 | 65 | |
| 66 | - $enabled = $this->config->getSystemValue('gs.federation', 'internal'); |
|
| 66 | + $enabled = $this->config->getSystemValue('gs.federation', 'internal'); |
|
| 67 | 67 | |
| 68 | - return $enabled === 'internal'; |
|
| 69 | - } |
|
| 68 | + return $enabled === 'internal'; |
|
| 69 | + } |
|
| 70 | 70 | |
| 71 | 71 | } |
@@ -32,20 +32,20 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | interface IConfig { |
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * check if global scale is enabled |
|
| 37 | - * |
|
| 38 | - * @since 12.0.1 |
|
| 39 | - * @return bool |
|
| 40 | - */ |
|
| 41 | - public function isGlobalScaleEnabled(); |
|
| 35 | + /** |
|
| 36 | + * check if global scale is enabled |
|
| 37 | + * |
|
| 38 | + * @since 12.0.1 |
|
| 39 | + * @return bool |
|
| 40 | + */ |
|
| 41 | + public function isGlobalScaleEnabled(); |
|
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * check if federation should only be used internally in a global scale setup |
|
| 45 | - * |
|
| 46 | - * @since 12.0.1 |
|
| 47 | - * @return bool |
|
| 48 | - */ |
|
| 49 | - public function onlyInternalFederation(); |
|
| 43 | + /** |
|
| 44 | + * check if federation should only be used internally in a global scale setup |
|
| 45 | + * |
|
| 46 | + * @since 12.0.1 |
|
| 47 | + * @return bool |
|
| 48 | + */ |
|
| 49 | + public function onlyInternalFederation(); |
|
| 50 | 50 | |
| 51 | 51 | } |
@@ -36,49 +36,49 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | class SimpleOutput implements IOutput { |
| 38 | 38 | |
| 39 | - /** @var ILogger */ |
|
| 40 | - private $logger; |
|
| 41 | - private $appName; |
|
| 39 | + /** @var ILogger */ |
|
| 40 | + private $logger; |
|
| 41 | + private $appName; |
|
| 42 | 42 | |
| 43 | - public function __construct(ILogger $logger, $appName) { |
|
| 44 | - $this->logger = $logger; |
|
| 45 | - $this->appName = $appName; |
|
| 46 | - } |
|
| 43 | + public function __construct(ILogger $logger, $appName) { |
|
| 44 | + $this->logger = $logger; |
|
| 45 | + $this->appName = $appName; |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | - /** |
|
| 49 | - * @param string $message |
|
| 50 | - * @since 9.1.0 |
|
| 51 | - */ |
|
| 52 | - public function info($message) { |
|
| 53 | - $this->logger->info($message, ['app' => $this->appName]); |
|
| 54 | - } |
|
| 48 | + /** |
|
| 49 | + * @param string $message |
|
| 50 | + * @since 9.1.0 |
|
| 51 | + */ |
|
| 52 | + public function info($message) { |
|
| 53 | + $this->logger->info($message, ['app' => $this->appName]); |
|
| 54 | + } |
|
| 55 | 55 | |
| 56 | - /** |
|
| 57 | - * @param string $message |
|
| 58 | - * @since 9.1.0 |
|
| 59 | - */ |
|
| 60 | - public function warning($message) { |
|
| 61 | - $this->logger->warning($message, ['app' => $this->appName]); |
|
| 62 | - } |
|
| 56 | + /** |
|
| 57 | + * @param string $message |
|
| 58 | + * @since 9.1.0 |
|
| 59 | + */ |
|
| 60 | + public function warning($message) { |
|
| 61 | + $this->logger->warning($message, ['app' => $this->appName]); |
|
| 62 | + } |
|
| 63 | 63 | |
| 64 | - /** |
|
| 65 | - * @param int $max |
|
| 66 | - * @since 9.1.0 |
|
| 67 | - */ |
|
| 68 | - public function startProgress($max = 0) { |
|
| 69 | - } |
|
| 64 | + /** |
|
| 65 | + * @param int $max |
|
| 66 | + * @since 9.1.0 |
|
| 67 | + */ |
|
| 68 | + public function startProgress($max = 0) { |
|
| 69 | + } |
|
| 70 | 70 | |
| 71 | - /** |
|
| 72 | - * @param int $step |
|
| 73 | - * @param string $description |
|
| 74 | - * @since 9.1.0 |
|
| 75 | - */ |
|
| 76 | - public function advance($step = 1, $description = '') { |
|
| 77 | - } |
|
| 71 | + /** |
|
| 72 | + * @param int $step |
|
| 73 | + * @param string $description |
|
| 74 | + * @since 9.1.0 |
|
| 75 | + */ |
|
| 76 | + public function advance($step = 1, $description = '') { |
|
| 77 | + } |
|
| 78 | 78 | |
| 79 | - /** |
|
| 80 | - * @since 9.1.0 |
|
| 81 | - */ |
|
| 82 | - public function finishProgress() { |
|
| 83 | - } |
|
| 79 | + /** |
|
| 80 | + * @since 9.1.0 |
|
| 81 | + */ |
|
| 82 | + public function finishProgress() { |
|
| 83 | + } |
|
| 84 | 84 | } |