@@ -23,10 +23,10 @@ |
||
| 23 | 23 | namespace OC\Preview; |
| 24 | 24 | |
| 25 | 25 | class XBitmap extends Image { |
| 26 | - /** |
|
| 27 | - * {@inheritDoc} |
|
| 28 | - */ |
|
| 29 | - public function getMimeType(): string { |
|
| 30 | - return '/image\/x-xbitmap/'; |
|
| 31 | - } |
|
| 26 | + /** |
|
| 27 | + * {@inheritDoc} |
|
| 28 | + */ |
|
| 29 | + public function getMimeType(): string { |
|
| 30 | + return '/image\/x-xbitmap/'; |
|
| 31 | + } |
|
| 32 | 32 | } |
@@ -23,10 +23,10 @@ |
||
| 23 | 23 | namespace OC\Preview; |
| 24 | 24 | |
| 25 | 25 | class PNG extends Image { |
| 26 | - /** |
|
| 27 | - * {@inheritDoc} |
|
| 28 | - */ |
|
| 29 | - public function getMimeType(): string { |
|
| 30 | - return '/image\/png/'; |
|
| 31 | - } |
|
| 26 | + /** |
|
| 27 | + * {@inheritDoc} |
|
| 28 | + */ |
|
| 29 | + public function getMimeType(): string { |
|
| 30 | + return '/image\/png/'; |
|
| 31 | + } |
|
| 32 | 32 | } |
@@ -23,10 +23,10 @@ |
||
| 23 | 23 | |
| 24 | 24 | //.docm, .dotm, .xls(m), .xlt(m), .xla(m), .ppt(m), .pot(m), .pps(m), .ppa(m) |
| 25 | 25 | class MSOffice2003 extends Office { |
| 26 | - /** |
|
| 27 | - * {@inheritDoc} |
|
| 28 | - */ |
|
| 29 | - public function getMimeType(): string { |
|
| 30 | - return '/application\/vnd.ms-.*/'; |
|
| 31 | - } |
|
| 26 | + /** |
|
| 27 | + * {@inheritDoc} |
|
| 28 | + */ |
|
| 29 | + public function getMimeType(): string { |
|
| 30 | + return '/application\/vnd.ms-.*/'; |
|
| 31 | + } |
|
| 32 | 32 | } |
@@ -23,10 +23,10 @@ |
||
| 23 | 23 | namespace OC\Preview; |
| 24 | 24 | |
| 25 | 25 | class JPEG extends Image { |
| 26 | - /** |
|
| 27 | - * {@inheritDoc} |
|
| 28 | - */ |
|
| 29 | - public function getMimeType(): string { |
|
| 30 | - return '/image\/jpeg/'; |
|
| 31 | - } |
|
| 26 | + /** |
|
| 27 | + * {@inheritDoc} |
|
| 28 | + */ |
|
| 29 | + public function getMimeType(): string { |
|
| 30 | + return '/image\/jpeg/'; |
|
| 31 | + } |
|
| 32 | 32 | } |
@@ -31,16 +31,16 @@ |
||
| 31 | 31 | |
| 32 | 32 | abstract class ARemoteWipeEvent extends Event { |
| 33 | 33 | |
| 34 | - /** @var IToken */ |
|
| 35 | - private $token; |
|
| 34 | + /** @var IToken */ |
|
| 35 | + private $token; |
|
| 36 | 36 | |
| 37 | - public function __construct(IToken $token) { |
|
| 38 | - parent::__construct(); |
|
| 39 | - $this->token = $token; |
|
| 40 | - } |
|
| 37 | + public function __construct(IToken $token) { |
|
| 38 | + parent::__construct(); |
|
| 39 | + $this->token = $token; |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | - public function getToken(): IToken { |
|
| 43 | - return $this->token; |
|
| 44 | - } |
|
| 42 | + public function getToken(): IToken { |
|
| 43 | + return $this->token; |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | 46 | } |
@@ -31,23 +31,23 @@ |
||
| 31 | 31 | * @deprecated 17.0.0 listen to the AddContentSecurityPolicyEvent to add a policy |
| 32 | 32 | */ |
| 33 | 33 | interface IContentSecurityPolicyManager { |
| 34 | - /** |
|
| 35 | - * Allows to inject something into the default content policy. This is for |
|
| 36 | - * example useful when you're injecting Javascript code into a view belonging |
|
| 37 | - * to another controller and cannot modify its Content-Security-Policy itself. |
|
| 38 | - * Note that the adjustment is only applied to applications that use AppFramework |
|
| 39 | - * controllers. |
|
| 40 | - * |
|
| 41 | - * To use this from your `app.php` use `\OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy)`, |
|
| 42 | - * $policy has to be of type `\OCP\AppFramework\Http\ContentSecurityPolicy`. |
|
| 43 | - * |
|
| 44 | - * WARNING: Using this API incorrectly may make the instance more insecure. |
|
| 45 | - * Do think twice before adding whitelisting resources. Please do also note |
|
| 46 | - * that it is not possible to use the `disallowXYZ` functions. |
|
| 47 | - * |
|
| 48 | - * @param EmptyContentSecurityPolicy $policy |
|
| 49 | - * @since 9.0.0 |
|
| 50 | - * @deprecated 17.0.0 listen to the AddContentSecurityPolicyEvent to add a policy |
|
| 51 | - */ |
|
| 52 | - public function addDefaultPolicy(EmptyContentSecurityPolicy $policy); |
|
| 34 | + /** |
|
| 35 | + * Allows to inject something into the default content policy. This is for |
|
| 36 | + * example useful when you're injecting Javascript code into a view belonging |
|
| 37 | + * to another controller and cannot modify its Content-Security-Policy itself. |
|
| 38 | + * Note that the adjustment is only applied to applications that use AppFramework |
|
| 39 | + * controllers. |
|
| 40 | + * |
|
| 41 | + * To use this from your `app.php` use `\OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy)`, |
|
| 42 | + * $policy has to be of type `\OCP\AppFramework\Http\ContentSecurityPolicy`. |
|
| 43 | + * |
|
| 44 | + * WARNING: Using this API incorrectly may make the instance more insecure. |
|
| 45 | + * Do think twice before adding whitelisting resources. Please do also note |
|
| 46 | + * that it is not possible to use the `disallowXYZ` functions. |
|
| 47 | + * |
|
| 48 | + * @param EmptyContentSecurityPolicy $policy |
|
| 49 | + * @since 9.0.0 |
|
| 50 | + * @deprecated 17.0.0 listen to the AddContentSecurityPolicyEvent to add a policy |
|
| 51 | + */ |
|
| 52 | + public function addDefaultPolicy(EmptyContentSecurityPolicy $policy); |
|
| 53 | 53 | } |
@@ -31,9 +31,9 @@ |
||
| 31 | 31 | * @since 17.0.0 |
| 32 | 32 | */ |
| 33 | 33 | interface IVersionedPreviewFile { |
| 34 | - /** |
|
| 35 | - * @return string |
|
| 36 | - * @since 17.0.0 |
|
| 37 | - */ |
|
| 38 | - public function getPreviewVersion(): string; |
|
| 34 | + /** |
|
| 35 | + * @return string |
|
| 36 | + * @since 17.0.0 |
|
| 37 | + */ |
|
| 38 | + public function getPreviewVersion(): string; |
|
| 39 | 39 | } |
@@ -26,9 +26,9 @@ |
||
| 26 | 26 | |
| 27 | 27 | interface IWipeableToken extends IToken { |
| 28 | 28 | |
| 29 | - /** |
|
| 30 | - * Mark the token for remote wipe |
|
| 31 | - */ |
|
| 32 | - public function wipe(): void; |
|
| 29 | + /** |
|
| 30 | + * Mark the token for remote wipe |
|
| 31 | + */ |
|
| 32 | + public function wipe(): void; |
|
| 33 | 33 | |
| 34 | 34 | } |
@@ -32,65 +32,65 @@ |
||
| 32 | 32 | |
| 33 | 33 | class Notifier implements INotifier { |
| 34 | 34 | |
| 35 | - /** @var IL10nFactory */ |
|
| 36 | - private $factory; |
|
| 35 | + /** @var IL10nFactory */ |
|
| 36 | + private $factory; |
|
| 37 | 37 | |
| 38 | - public function __construct(IL10nFactory $l10nFactory) { |
|
| 39 | - $this->factory = $l10nFactory; |
|
| 40 | - } |
|
| 38 | + public function __construct(IL10nFactory $l10nFactory) { |
|
| 39 | + $this->factory = $l10nFactory; |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * @inheritDoc |
|
| 44 | - */ |
|
| 45 | - public function prepare(INotification $notification, string $languageCode): INotification { |
|
| 46 | - if ($notification->getApp() !== 'auth') { |
|
| 47 | - // Not my app => throw |
|
| 48 | - throw new InvalidArgumentException(); |
|
| 49 | - } |
|
| 42 | + /** |
|
| 43 | + * @inheritDoc |
|
| 44 | + */ |
|
| 45 | + public function prepare(INotification $notification, string $languageCode): INotification { |
|
| 46 | + if ($notification->getApp() !== 'auth') { |
|
| 47 | + // Not my app => throw |
|
| 48 | + throw new InvalidArgumentException(); |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | - // Read the language from the notification |
|
| 52 | - $l = $this->factory->get('lib', $languageCode); |
|
| 51 | + // Read the language from the notification |
|
| 52 | + $l = $this->factory->get('lib', $languageCode); |
|
| 53 | 53 | |
| 54 | - switch ($notification->getSubject()) { |
|
| 55 | - case 'remote_wipe_start': |
|
| 56 | - $notification->setParsedSubject( |
|
| 57 | - $l->t('Remote wipe started') |
|
| 58 | - )->setParsedMessage( |
|
| 59 | - $l->t('A remote wipe was started on device %s', $notification->getSubjectParameters()) |
|
| 60 | - ); |
|
| 54 | + switch ($notification->getSubject()) { |
|
| 55 | + case 'remote_wipe_start': |
|
| 56 | + $notification->setParsedSubject( |
|
| 57 | + $l->t('Remote wipe started') |
|
| 58 | + )->setParsedMessage( |
|
| 59 | + $l->t('A remote wipe was started on device %s', $notification->getSubjectParameters()) |
|
| 60 | + ); |
|
| 61 | 61 | |
| 62 | - return $notification; |
|
| 63 | - case 'remote_wipe_finish': |
|
| 64 | - $notification->setParsedSubject( |
|
| 65 | - $l->t('Remote wipe finished') |
|
| 66 | - )->setParsedMessage( |
|
| 67 | - $l->t('The remote wipe on %s has finished', $notification->getSubjectParameters()) |
|
| 68 | - ); |
|
| 62 | + return $notification; |
|
| 63 | + case 'remote_wipe_finish': |
|
| 64 | + $notification->setParsedSubject( |
|
| 65 | + $l->t('Remote wipe finished') |
|
| 66 | + )->setParsedMessage( |
|
| 67 | + $l->t('The remote wipe on %s has finished', $notification->getSubjectParameters()) |
|
| 68 | + ); |
|
| 69 | 69 | |
| 70 | - return $notification; |
|
| 71 | - default: |
|
| 72 | - // Unknown subject => Unknown notification => throw |
|
| 73 | - throw new InvalidArgumentException(); |
|
| 74 | - } |
|
| 75 | - } |
|
| 70 | + return $notification; |
|
| 71 | + default: |
|
| 72 | + // Unknown subject => Unknown notification => throw |
|
| 73 | + throw new InvalidArgumentException(); |
|
| 74 | + } |
|
| 75 | + } |
|
| 76 | 76 | |
| 77 | - /** |
|
| 78 | - * Identifier of the notifier, only use [a-z0-9_] |
|
| 79 | - * |
|
| 80 | - * @return string |
|
| 81 | - * @since 17.0.0 |
|
| 82 | - */ |
|
| 83 | - public function getID(): string { |
|
| 84 | - return 'auth'; |
|
| 85 | - } |
|
| 77 | + /** |
|
| 78 | + * Identifier of the notifier, only use [a-z0-9_] |
|
| 79 | + * |
|
| 80 | + * @return string |
|
| 81 | + * @since 17.0.0 |
|
| 82 | + */ |
|
| 83 | + public function getID(): string { |
|
| 84 | + return 'auth'; |
|
| 85 | + } |
|
| 86 | 86 | |
| 87 | - /** |
|
| 88 | - * Human readable name describing the notifier |
|
| 89 | - * |
|
| 90 | - * @return string |
|
| 91 | - * @since 17.0.0 |
|
| 92 | - */ |
|
| 93 | - public function getName(): string { |
|
| 94 | - return $this->factory->get('lib')->t('Authentication'); |
|
| 95 | - } |
|
| 87 | + /** |
|
| 88 | + * Human readable name describing the notifier |
|
| 89 | + * |
|
| 90 | + * @return string |
|
| 91 | + * @since 17.0.0 |
|
| 92 | + */ |
|
| 93 | + public function getName(): string { |
|
| 94 | + return $this->factory->get('lib')->t('Authentication'); |
|
| 95 | + } |
|
| 96 | 96 | } |