@@ -31,34 +31,34 @@ |
||
31 | 31 | |
32 | 32 | class EMailProvider implements IProvider { |
33 | 33 | |
34 | - /** @var IActionFactory */ |
|
35 | - private $actionFactory; |
|
34 | + /** @var IActionFactory */ |
|
35 | + private $actionFactory; |
|
36 | 36 | |
37 | - /** @var IURLGenerator */ |
|
38 | - private $urlGenerator; |
|
37 | + /** @var IURLGenerator */ |
|
38 | + private $urlGenerator; |
|
39 | 39 | |
40 | - /** |
|
41 | - * @param IActionFactory $actionFactory |
|
42 | - * @param IURLGenerator $urlGenerator |
|
43 | - */ |
|
44 | - public function __construct(IActionFactory $actionFactory, IURLGenerator $urlGenerator) { |
|
45 | - $this->actionFactory = $actionFactory; |
|
46 | - $this->urlGenerator = $urlGenerator; |
|
47 | - } |
|
40 | + /** |
|
41 | + * @param IActionFactory $actionFactory |
|
42 | + * @param IURLGenerator $urlGenerator |
|
43 | + */ |
|
44 | + public function __construct(IActionFactory $actionFactory, IURLGenerator $urlGenerator) { |
|
45 | + $this->actionFactory = $actionFactory; |
|
46 | + $this->urlGenerator = $urlGenerator; |
|
47 | + } |
|
48 | 48 | |
49 | - /** |
|
50 | - * @param IEntry $entry |
|
51 | - */ |
|
52 | - public function process(IEntry $entry) { |
|
53 | - $iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/mail.svg')); |
|
54 | - foreach ($entry->getEMailAddresses() as $address) { |
|
55 | - if (empty($address)) { |
|
56 | - // Skip |
|
57 | - continue; |
|
58 | - } |
|
59 | - $action = $this->actionFactory->newEMailAction($iconUrl, $address, $address); |
|
60 | - $entry->addAction($action); |
|
61 | - } |
|
62 | - } |
|
49 | + /** |
|
50 | + * @param IEntry $entry |
|
51 | + */ |
|
52 | + public function process(IEntry $entry) { |
|
53 | + $iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/mail.svg')); |
|
54 | + foreach ($entry->getEMailAddresses() as $address) { |
|
55 | + if (empty($address)) { |
|
56 | + // Skip |
|
57 | + continue; |
|
58 | + } |
|
59 | + $action = $this->actionFactory->newEMailAction($iconUrl, $address, $address); |
|
60 | + $entry->addAction($action); |
|
61 | + } |
|
62 | + } |
|
63 | 63 | |
64 | 64 | } |
@@ -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 | } |
@@ -31,31 +31,31 @@ |
||
31 | 31 | */ |
32 | 32 | interface ICredentials { |
33 | 33 | |
34 | - /** |
|
35 | - * Get the user UID |
|
36 | - * |
|
37 | - * @since 12 |
|
38 | - * |
|
39 | - * @return string |
|
40 | - */ |
|
41 | - public function getUID(); |
|
34 | + /** |
|
35 | + * Get the user UID |
|
36 | + * |
|
37 | + * @since 12 |
|
38 | + * |
|
39 | + * @return string |
|
40 | + */ |
|
41 | + public function getUID(); |
|
42 | 42 | |
43 | - /** |
|
44 | - * Get the login name the users used to login |
|
45 | - * |
|
46 | - * @since 12 |
|
47 | - * |
|
48 | - * @return string |
|
49 | - */ |
|
50 | - public function getLoginName(); |
|
43 | + /** |
|
44 | + * Get the login name the users used to login |
|
45 | + * |
|
46 | + * @since 12 |
|
47 | + * |
|
48 | + * @return string |
|
49 | + */ |
|
50 | + public function getLoginName(); |
|
51 | 51 | |
52 | - /** |
|
53 | - * Get the password |
|
54 | - * |
|
55 | - * @since 12 |
|
56 | - * |
|
57 | - * @return string |
|
58 | - * @throws PasswordUnavailableException |
|
59 | - */ |
|
60 | - public function getPassword(); |
|
52 | + /** |
|
53 | + * Get the password |
|
54 | + * |
|
55 | + * @since 12 |
|
56 | + * |
|
57 | + * @return string |
|
58 | + * @throws PasswordUnavailableException |
|
59 | + */ |
|
60 | + public function getPassword(); |
|
61 | 61 | } |
@@ -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 | } |
@@ -35,43 +35,43 @@ |
||
35 | 35 | class SetMasterKeyStatus implements IRepairStep { |
36 | 36 | |
37 | 37 | |
38 | - /** @var IConfig */ |
|
39 | - private $config; |
|
38 | + /** @var IConfig */ |
|
39 | + private $config; |
|
40 | 40 | |
41 | 41 | |
42 | - public function __construct(IConfig $config) { |
|
43 | - $this->config = $config; |
|
44 | - } |
|
42 | + public function __construct(IConfig $config) { |
|
43 | + $this->config = $config; |
|
44 | + } |
|
45 | 45 | |
46 | - /** |
|
47 | - * Returns the step's name |
|
48 | - * |
|
49 | - * @return string |
|
50 | - * @since 9.1.0 |
|
51 | - */ |
|
52 | - public function getName() { |
|
53 | - return 'Write default encryption module configuration to the database'; |
|
54 | - } |
|
46 | + /** |
|
47 | + * Returns the step's name |
|
48 | + * |
|
49 | + * @return string |
|
50 | + * @since 9.1.0 |
|
51 | + */ |
|
52 | + public function getName() { |
|
53 | + return 'Write default encryption module configuration to the database'; |
|
54 | + } |
|
55 | 55 | |
56 | - /** |
|
57 | - * @param IOutput $output |
|
58 | - */ |
|
59 | - public function run(IOutput $output) { |
|
60 | - if (!$this->shouldRun()) { |
|
61 | - return; |
|
62 | - } |
|
56 | + /** |
|
57 | + * @param IOutput $output |
|
58 | + */ |
|
59 | + public function run(IOutput $output) { |
|
60 | + if (!$this->shouldRun()) { |
|
61 | + return; |
|
62 | + } |
|
63 | 63 | |
64 | - // if no config for the master key is set we set it explicitly to '0' in |
|
65 | - // order not to break old installations because the default changed to '1'. |
|
66 | - $configAlreadySet = $this->config->getAppValue('encryption', 'useMasterKey', false); |
|
67 | - if ($configAlreadySet === false) { |
|
68 | - $this->config->setAppValue('encryption', 'useMasterKey', '0'); |
|
69 | - } |
|
70 | - } |
|
64 | + // if no config for the master key is set we set it explicitly to '0' in |
|
65 | + // order not to break old installations because the default changed to '1'. |
|
66 | + $configAlreadySet = $this->config->getAppValue('encryption', 'useMasterKey', false); |
|
67 | + if ($configAlreadySet === false) { |
|
68 | + $this->config->setAppValue('encryption', 'useMasterKey', '0'); |
|
69 | + } |
|
70 | + } |
|
71 | 71 | |
72 | - protected function shouldRun() { |
|
73 | - $appVersion = $this->config->getAppValue('encryption', 'installed_version', '0.0.0'); |
|
74 | - return version_compare($appVersion, '2.0.0', '<'); |
|
75 | - } |
|
72 | + protected function shouldRun() { |
|
73 | + $appVersion = $this->config->getAppValue('encryption', 'installed_version', '0.0.0'); |
|
74 | + return version_compare($appVersion, '2.0.0', '<'); |
|
75 | + } |
|
76 | 76 | |
77 | 77 | } |
@@ -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 | } |
@@ -33,14 +33,14 @@ |
||
33 | 33 | * @see \Sabre\DAV\Server |
34 | 34 | */ |
35 | 35 | class Server extends \Sabre\DAV\Server { |
36 | - /** @var CachingTree $tree */ |
|
36 | + /** @var CachingTree $tree */ |
|
37 | 37 | |
38 | - /** |
|
39 | - * @see \Sabre\DAV\Server |
|
40 | - */ |
|
41 | - public function __construct($treeOrNode = null) { |
|
42 | - parent::__construct($treeOrNode); |
|
43 | - self::$exposeVersion = false; |
|
44 | - $this->enablePropfindDepthInfinity = true; |
|
45 | - } |
|
38 | + /** |
|
39 | + * @see \Sabre\DAV\Server |
|
40 | + */ |
|
41 | + public function __construct($treeOrNode = null) { |
|
42 | + parent::__construct($treeOrNode); |
|
43 | + self::$exposeVersion = false; |
|
44 | + $this->enablePropfindDepthInfinity = true; |
|
45 | + } |
|
46 | 46 | } |