@@ -37,22 +37,22 @@ |
||
| 37 | 37 | * @method void setExpiration(int $expiration) |
| 38 | 38 | */ |
| 39 | 39 | class Direct extends Entity { |
| 40 | - /** @var string */ |
|
| 41 | - protected $userId; |
|
| 40 | + /** @var string */ |
|
| 41 | + protected $userId; |
|
| 42 | 42 | |
| 43 | - /** @var int */ |
|
| 44 | - protected $fileId; |
|
| 43 | + /** @var int */ |
|
| 44 | + protected $fileId; |
|
| 45 | 45 | |
| 46 | - /** @var string */ |
|
| 47 | - protected $token; |
|
| 46 | + /** @var string */ |
|
| 47 | + protected $token; |
|
| 48 | 48 | |
| 49 | - /** @var int */ |
|
| 50 | - protected $expiration; |
|
| 49 | + /** @var int */ |
|
| 50 | + protected $expiration; |
|
| 51 | 51 | |
| 52 | - public function __construct() { |
|
| 53 | - $this->addType('userId', 'string'); |
|
| 54 | - $this->addType('fileId', 'int'); |
|
| 55 | - $this->addType('token', 'string'); |
|
| 56 | - $this->addType('expiration', 'int'); |
|
| 57 | - } |
|
| 52 | + public function __construct() { |
|
| 53 | + $this->addType('userId', 'string'); |
|
| 54 | + $this->addType('fileId', 'int'); |
|
| 55 | + $this->addType('token', 'string'); |
|
| 56 | + $this->addType('expiration', 'int'); |
|
| 57 | + } |
|
| 58 | 58 | } |
@@ -36,39 +36,39 @@ |
||
| 36 | 36 | * Class that will watch filesystem activity and remove previews as needed. |
| 37 | 37 | */ |
| 38 | 38 | class Watcher { |
| 39 | - /** @var IAppData */ |
|
| 40 | - private $appData; |
|
| 39 | + /** @var IAppData */ |
|
| 40 | + private $appData; |
|
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * Watcher constructor. |
|
| 44 | - * |
|
| 45 | - * @param IAppData $appData |
|
| 46 | - */ |
|
| 47 | - public function __construct(IAppData $appData) { |
|
| 48 | - $this->appData = $appData; |
|
| 49 | - } |
|
| 42 | + /** |
|
| 43 | + * Watcher constructor. |
|
| 44 | + * |
|
| 45 | + * @param IAppData $appData |
|
| 46 | + */ |
|
| 47 | + public function __construct(IAppData $appData) { |
|
| 48 | + $this->appData = $appData; |
|
| 49 | + } |
|
| 50 | 50 | |
| 51 | - public function postWrite(Node $node) { |
|
| 52 | - $this->deleteNode($node); |
|
| 53 | - } |
|
| 51 | + public function postWrite(Node $node) { |
|
| 52 | + $this->deleteNode($node); |
|
| 53 | + } |
|
| 54 | 54 | |
| 55 | - protected function deleteNode(Node $node) { |
|
| 56 | - // We only handle files |
|
| 57 | - if ($node instanceof Folder) { |
|
| 58 | - return; |
|
| 59 | - } |
|
| 55 | + protected function deleteNode(Node $node) { |
|
| 56 | + // We only handle files |
|
| 57 | + if ($node instanceof Folder) { |
|
| 58 | + return; |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - try { |
|
| 62 | - $folder = $this->appData->getFolder((string)$node->getId()); |
|
| 63 | - $folder->delete(); |
|
| 64 | - } catch (NotFoundException $e) { |
|
| 65 | - //Nothing to do |
|
| 66 | - } |
|
| 67 | - } |
|
| 61 | + try { |
|
| 62 | + $folder = $this->appData->getFolder((string)$node->getId()); |
|
| 63 | + $folder->delete(); |
|
| 64 | + } catch (NotFoundException $e) { |
|
| 65 | + //Nothing to do |
|
| 66 | + } |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | - public function versionRollback(array $data) { |
|
| 70 | - if (isset($data['node'])) { |
|
| 71 | - $this->deleteNode($data['node']); |
|
| 72 | - } |
|
| 73 | - } |
|
| 69 | + public function versionRollback(array $data) { |
|
| 70 | + if (isset($data['node'])) { |
|
| 71 | + $this->deleteNode($data['node']); |
|
| 72 | + } |
|
| 73 | + } |
|
| 74 | 74 | } |
@@ -25,10 +25,10 @@ |
||
| 25 | 25 | use OCP\IL10N; |
| 26 | 26 | |
| 27 | 27 | class KerberosAuth extends AuthMechanism { |
| 28 | - public function __construct(IL10N $l) { |
|
| 29 | - $this |
|
| 30 | - ->setIdentifier('smb::kerberos') |
|
| 31 | - ->setScheme(self::SCHEME_SMB) |
|
| 32 | - ->setText($l->t('Kerberos ticket')); |
|
| 33 | - } |
|
| 28 | + public function __construct(IL10N $l) { |
|
| 29 | + $this |
|
| 30 | + ->setIdentifier('smb::kerberos') |
|
| 31 | + ->setScheme(self::SCHEME_SMB) |
|
| 32 | + ->setText($l->t('Kerberos ticket')); |
|
| 33 | + } |
|
| 34 | 34 | } |
@@ -43,77 +43,77 @@ |
||
| 43 | 43 | * @since 6.0.0 |
| 44 | 44 | */ |
| 45 | 45 | interface IL10N { |
| 46 | - /** |
|
| 47 | - * Translating |
|
| 48 | - * @param string $text The text we need a translation for |
|
| 49 | - * @param array|string $parameters default:array() Parameters for sprintf |
|
| 50 | - * @return string Translation or the same text |
|
| 51 | - * |
|
| 52 | - * Returns the translation. If no translation is found, $text will be |
|
| 53 | - * returned. |
|
| 54 | - * @since 6.0.0 |
|
| 55 | - */ |
|
| 56 | - public function t(string $text, $parameters = []): string; |
|
| 46 | + /** |
|
| 47 | + * Translating |
|
| 48 | + * @param string $text The text we need a translation for |
|
| 49 | + * @param array|string $parameters default:array() Parameters for sprintf |
|
| 50 | + * @return string Translation or the same text |
|
| 51 | + * |
|
| 52 | + * Returns the translation. If no translation is found, $text will be |
|
| 53 | + * returned. |
|
| 54 | + * @since 6.0.0 |
|
| 55 | + */ |
|
| 56 | + public function t(string $text, $parameters = []): string; |
|
| 57 | 57 | |
| 58 | - /** |
|
| 59 | - * Translating |
|
| 60 | - * @param string $text_singular the string to translate for exactly one object |
|
| 61 | - * @param string $text_plural the string to translate for n objects |
|
| 62 | - * @param integer $count Number of objects |
|
| 63 | - * @param array $parameters default:array() Parameters for sprintf |
|
| 64 | - * @return string Translation or the same text |
|
| 65 | - * |
|
| 66 | - * Returns the translation. If no translation is found, $text will be |
|
| 67 | - * returned. %n will be replaced with the number of objects. |
|
| 68 | - * |
|
| 69 | - * The correct plural is determined by the plural_forms-function |
|
| 70 | - * provided by the po file. |
|
| 71 | - * @since 6.0.0 |
|
| 72 | - * |
|
| 73 | - */ |
|
| 74 | - public function n(string $text_singular, string $text_plural, int $count, array $parameters = []): string; |
|
| 58 | + /** |
|
| 59 | + * Translating |
|
| 60 | + * @param string $text_singular the string to translate for exactly one object |
|
| 61 | + * @param string $text_plural the string to translate for n objects |
|
| 62 | + * @param integer $count Number of objects |
|
| 63 | + * @param array $parameters default:array() Parameters for sprintf |
|
| 64 | + * @return string Translation or the same text |
|
| 65 | + * |
|
| 66 | + * Returns the translation. If no translation is found, $text will be |
|
| 67 | + * returned. %n will be replaced with the number of objects. |
|
| 68 | + * |
|
| 69 | + * The correct plural is determined by the plural_forms-function |
|
| 70 | + * provided by the po file. |
|
| 71 | + * @since 6.0.0 |
|
| 72 | + * |
|
| 73 | + */ |
|
| 74 | + public function n(string $text_singular, string $text_plural, int $count, array $parameters = []): string; |
|
| 75 | 75 | |
| 76 | - /** |
|
| 77 | - * Localization |
|
| 78 | - * @param string $type Type of localization |
|
| 79 | - * @param \DateTime|int|string $data parameters for this localization |
|
| 80 | - * @param array $options currently supports following options: |
|
| 81 | - * - 'width': handed into \Punic\Calendar::formatDate as second parameter |
|
| 82 | - * @return string|int|false |
|
| 83 | - * |
|
| 84 | - * Returns the localized data. |
|
| 85 | - * |
|
| 86 | - * Implemented types: |
|
| 87 | - * - date |
|
| 88 | - * - Creates a date |
|
| 89 | - * - l10n-field: date |
|
| 90 | - * - params: timestamp (int/string) |
|
| 91 | - * - datetime |
|
| 92 | - * - Creates date and time |
|
| 93 | - * - l10n-field: datetime |
|
| 94 | - * - params: timestamp (int/string) |
|
| 95 | - * - time |
|
| 96 | - * - Creates a time |
|
| 97 | - * - l10n-field: time |
|
| 98 | - * - params: timestamp (int/string) |
|
| 99 | - * @since 6.0.0 - parameter $options was added in 8.0.0 |
|
| 100 | - */ |
|
| 101 | - public function l(string $type, $data, array $options = []); |
|
| 76 | + /** |
|
| 77 | + * Localization |
|
| 78 | + * @param string $type Type of localization |
|
| 79 | + * @param \DateTime|int|string $data parameters for this localization |
|
| 80 | + * @param array $options currently supports following options: |
|
| 81 | + * - 'width': handed into \Punic\Calendar::formatDate as second parameter |
|
| 82 | + * @return string|int|false |
|
| 83 | + * |
|
| 84 | + * Returns the localized data. |
|
| 85 | + * |
|
| 86 | + * Implemented types: |
|
| 87 | + * - date |
|
| 88 | + * - Creates a date |
|
| 89 | + * - l10n-field: date |
|
| 90 | + * - params: timestamp (int/string) |
|
| 91 | + * - datetime |
|
| 92 | + * - Creates date and time |
|
| 93 | + * - l10n-field: datetime |
|
| 94 | + * - params: timestamp (int/string) |
|
| 95 | + * - time |
|
| 96 | + * - Creates a time |
|
| 97 | + * - l10n-field: time |
|
| 98 | + * - params: timestamp (int/string) |
|
| 99 | + * @since 6.0.0 - parameter $options was added in 8.0.0 |
|
| 100 | + */ |
|
| 101 | + public function l(string $type, $data, array $options = []); |
|
| 102 | 102 | |
| 103 | 103 | |
| 104 | - /** |
|
| 105 | - * The code (en, de, ...) of the language that is used for this IL10N object |
|
| 106 | - * |
|
| 107 | - * @return string language |
|
| 108 | - * @since 7.0.0 |
|
| 109 | - */ |
|
| 110 | - public function getLanguageCode(): string ; |
|
| 104 | + /** |
|
| 105 | + * The code (en, de, ...) of the language that is used for this IL10N object |
|
| 106 | + * |
|
| 107 | + * @return string language |
|
| 108 | + * @since 7.0.0 |
|
| 109 | + */ |
|
| 110 | + public function getLanguageCode(): string ; |
|
| 111 | 111 | |
| 112 | - /** |
|
| 113 | - * * The code (en_US, fr_CA, ...) of the locale that is used for this IL10N object |
|
| 114 | - * |
|
| 115 | - * @return string locale |
|
| 116 | - * @since 14.0.0 |
|
| 117 | - */ |
|
| 118 | - public function getLocaleCode(): string; |
|
| 112 | + /** |
|
| 113 | + * * The code (en_US, fr_CA, ...) of the locale that is used for this IL10N object |
|
| 114 | + * |
|
| 115 | + * @return string locale |
|
| 116 | + * @since 14.0.0 |
|
| 117 | + */ |
|
| 118 | + public function getLocaleCode(): string; |
|
| 119 | 119 | } |
@@ -40,22 +40,22 @@ |
||
| 40 | 40 | * @method void setData(string $data) |
| 41 | 41 | */ |
| 42 | 42 | class ChangesResult extends Entity { |
| 43 | - /** @var string */ |
|
| 44 | - protected $version = ''; |
|
| 43 | + /** @var string */ |
|
| 44 | + protected $version = ''; |
|
| 45 | 45 | |
| 46 | - /** @var string */ |
|
| 47 | - protected $etag = ''; |
|
| 46 | + /** @var string */ |
|
| 47 | + protected $etag = ''; |
|
| 48 | 48 | |
| 49 | - /** @var int */ |
|
| 50 | - protected $lastCheck = 0; |
|
| 49 | + /** @var int */ |
|
| 50 | + protected $lastCheck = 0; |
|
| 51 | 51 | |
| 52 | - /** @var string */ |
|
| 53 | - protected $data = ''; |
|
| 52 | + /** @var string */ |
|
| 53 | + protected $data = ''; |
|
| 54 | 54 | |
| 55 | - public function __construct() { |
|
| 56 | - $this->addType('version', 'string'); |
|
| 57 | - $this->addType('etag', 'string'); |
|
| 58 | - $this->addType('lastCheck', 'int'); |
|
| 59 | - $this->addType('data', 'string'); |
|
| 60 | - } |
|
| 55 | + public function __construct() { |
|
| 56 | + $this->addType('version', 'string'); |
|
| 57 | + $this->addType('etag', 'string'); |
|
| 58 | + $this->addType('lastCheck', 'int'); |
|
| 59 | + $this->addType('data', 'string'); |
|
| 60 | + } |
|
| 61 | 61 | } |
@@ -30,72 +30,72 @@ |
||
| 30 | 30 | |
| 31 | 31 | class FileChanges implements IFilter { |
| 32 | 32 | |
| 33 | - /** @var IL10N */ |
|
| 34 | - protected $l; |
|
| 33 | + /** @var IL10N */ |
|
| 34 | + protected $l; |
|
| 35 | 35 | |
| 36 | - /** @var IURLGenerator */ |
|
| 37 | - protected $url; |
|
| 36 | + /** @var IURLGenerator */ |
|
| 37 | + protected $url; |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * @param IL10N $l |
|
| 41 | - * @param IURLGenerator $url |
|
| 42 | - */ |
|
| 43 | - public function __construct(IL10N $l, IURLGenerator $url) { |
|
| 44 | - $this->l = $l; |
|
| 45 | - $this->url = $url; |
|
| 46 | - } |
|
| 39 | + /** |
|
| 40 | + * @param IL10N $l |
|
| 41 | + * @param IURLGenerator $url |
|
| 42 | + */ |
|
| 43 | + public function __construct(IL10N $l, IURLGenerator $url) { |
|
| 44 | + $this->l = $l; |
|
| 45 | + $this->url = $url; |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | - /** |
|
| 49 | - * @return string Lowercase a-z only identifier |
|
| 50 | - * @since 11.0.0 |
|
| 51 | - */ |
|
| 52 | - public function getIdentifier() { |
|
| 53 | - return 'files'; |
|
| 54 | - } |
|
| 48 | + /** |
|
| 49 | + * @return string Lowercase a-z only identifier |
|
| 50 | + * @since 11.0.0 |
|
| 51 | + */ |
|
| 52 | + public function getIdentifier() { |
|
| 53 | + return 'files'; |
|
| 54 | + } |
|
| 55 | 55 | |
| 56 | - /** |
|
| 57 | - * @return string A translated string |
|
| 58 | - * @since 11.0.0 |
|
| 59 | - */ |
|
| 60 | - public function getName() { |
|
| 61 | - return $this->l->t('File changes'); |
|
| 62 | - } |
|
| 56 | + /** |
|
| 57 | + * @return string A translated string |
|
| 58 | + * @since 11.0.0 |
|
| 59 | + */ |
|
| 60 | + public function getName() { |
|
| 61 | + return $this->l->t('File changes'); |
|
| 62 | + } |
|
| 63 | 63 | |
| 64 | - /** |
|
| 65 | - * @return int |
|
| 66 | - * @since 11.0.0 |
|
| 67 | - */ |
|
| 68 | - public function getPriority() { |
|
| 69 | - return 30; |
|
| 70 | - } |
|
| 64 | + /** |
|
| 65 | + * @return int |
|
| 66 | + * @since 11.0.0 |
|
| 67 | + */ |
|
| 68 | + public function getPriority() { |
|
| 69 | + return 30; |
|
| 70 | + } |
|
| 71 | 71 | |
| 72 | - /** |
|
| 73 | - * @return string Full URL to an icon, empty string when none is given |
|
| 74 | - * @since 11.0.0 |
|
| 75 | - */ |
|
| 76 | - public function getIcon() { |
|
| 77 | - return $this->url->getAbsoluteURL($this->url->imagePath('core', 'places/files.svg')); |
|
| 78 | - } |
|
| 72 | + /** |
|
| 73 | + * @return string Full URL to an icon, empty string when none is given |
|
| 74 | + * @since 11.0.0 |
|
| 75 | + */ |
|
| 76 | + public function getIcon() { |
|
| 77 | + return $this->url->getAbsoluteURL($this->url->imagePath('core', 'places/files.svg')); |
|
| 78 | + } |
|
| 79 | 79 | |
| 80 | - /** |
|
| 81 | - * @param string[] $types |
|
| 82 | - * @return string[] An array of allowed apps from which activities should be displayed |
|
| 83 | - * @since 11.0.0 |
|
| 84 | - */ |
|
| 85 | - public function filterTypes(array $types) { |
|
| 86 | - return array_intersect([ |
|
| 87 | - 'file_created', |
|
| 88 | - 'file_changed', |
|
| 89 | - 'file_deleted', |
|
| 90 | - 'file_restored', |
|
| 91 | - ], $types); |
|
| 92 | - } |
|
| 80 | + /** |
|
| 81 | + * @param string[] $types |
|
| 82 | + * @return string[] An array of allowed apps from which activities should be displayed |
|
| 83 | + * @since 11.0.0 |
|
| 84 | + */ |
|
| 85 | + public function filterTypes(array $types) { |
|
| 86 | + return array_intersect([ |
|
| 87 | + 'file_created', |
|
| 88 | + 'file_changed', |
|
| 89 | + 'file_deleted', |
|
| 90 | + 'file_restored', |
|
| 91 | + ], $types); |
|
| 92 | + } |
|
| 93 | 93 | |
| 94 | - /** |
|
| 95 | - * @return string[] An array of allowed apps from which activities should be displayed |
|
| 96 | - * @since 11.0.0 |
|
| 97 | - */ |
|
| 98 | - public function allowedApps() { |
|
| 99 | - return ['files']; |
|
| 100 | - } |
|
| 94 | + /** |
|
| 95 | + * @return string[] An array of allowed apps from which activities should be displayed |
|
| 96 | + * @since 11.0.0 |
|
| 97 | + */ |
|
| 98 | + public function allowedApps() { |
|
| 99 | + return ['files']; |
|
| 100 | + } |
|
| 101 | 101 | } |
@@ -30,65 +30,65 @@ |
||
| 30 | 30 | |
| 31 | 31 | class Calendar implements IFilter { |
| 32 | 32 | |
| 33 | - /** @var IL10N */ |
|
| 34 | - protected $l; |
|
| 33 | + /** @var IL10N */ |
|
| 34 | + protected $l; |
|
| 35 | 35 | |
| 36 | - /** @var IURLGenerator */ |
|
| 37 | - protected $url; |
|
| 36 | + /** @var IURLGenerator */ |
|
| 37 | + protected $url; |
|
| 38 | 38 | |
| 39 | - public function __construct(IL10N $l, IURLGenerator $url) { |
|
| 40 | - $this->l = $l; |
|
| 41 | - $this->url = $url; |
|
| 42 | - } |
|
| 39 | + public function __construct(IL10N $l, IURLGenerator $url) { |
|
| 40 | + $this->l = $l; |
|
| 41 | + $this->url = $url; |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * @return string Lowercase a-z and underscore only identifier |
|
| 46 | - * @since 11.0.0 |
|
| 47 | - */ |
|
| 48 | - public function getIdentifier() { |
|
| 49 | - return 'calendar'; |
|
| 50 | - } |
|
| 44 | + /** |
|
| 45 | + * @return string Lowercase a-z and underscore only identifier |
|
| 46 | + * @since 11.0.0 |
|
| 47 | + */ |
|
| 48 | + public function getIdentifier() { |
|
| 49 | + return 'calendar'; |
|
| 50 | + } |
|
| 51 | 51 | |
| 52 | - /** |
|
| 53 | - * @return string A translated string |
|
| 54 | - * @since 11.0.0 |
|
| 55 | - */ |
|
| 56 | - public function getName() { |
|
| 57 | - return $this->l->t('Calendar'); |
|
| 58 | - } |
|
| 52 | + /** |
|
| 53 | + * @return string A translated string |
|
| 54 | + * @since 11.0.0 |
|
| 55 | + */ |
|
| 56 | + public function getName() { |
|
| 57 | + return $this->l->t('Calendar'); |
|
| 58 | + } |
|
| 59 | 59 | |
| 60 | - /** |
|
| 61 | - * @return int whether the filter should be rather on the top or bottom of |
|
| 62 | - * the admin section. The filters are arranged in ascending order of the |
|
| 63 | - * priority values. It is required to return a value between 0 and 100. |
|
| 64 | - * @since 11.0.0 |
|
| 65 | - */ |
|
| 66 | - public function getPriority() { |
|
| 67 | - return 40; |
|
| 68 | - } |
|
| 60 | + /** |
|
| 61 | + * @return int whether the filter should be rather on the top or bottom of |
|
| 62 | + * the admin section. The filters are arranged in ascending order of the |
|
| 63 | + * priority values. It is required to return a value between 0 and 100. |
|
| 64 | + * @since 11.0.0 |
|
| 65 | + */ |
|
| 66 | + public function getPriority() { |
|
| 67 | + return 40; |
|
| 68 | + } |
|
| 69 | 69 | |
| 70 | - /** |
|
| 71 | - * @return string Full URL to an icon, empty string when none is given |
|
| 72 | - * @since 11.0.0 |
|
| 73 | - */ |
|
| 74 | - public function getIcon() { |
|
| 75 | - return $this->url->getAbsoluteURL($this->url->imagePath('core', 'places/calendar.svg')); |
|
| 76 | - } |
|
| 70 | + /** |
|
| 71 | + * @return string Full URL to an icon, empty string when none is given |
|
| 72 | + * @since 11.0.0 |
|
| 73 | + */ |
|
| 74 | + public function getIcon() { |
|
| 75 | + return $this->url->getAbsoluteURL($this->url->imagePath('core', 'places/calendar.svg')); |
|
| 76 | + } |
|
| 77 | 77 | |
| 78 | - /** |
|
| 79 | - * @param string[] $types |
|
| 80 | - * @return string[] An array of allowed apps from which activities should be displayed |
|
| 81 | - * @since 11.0.0 |
|
| 82 | - */ |
|
| 83 | - public function filterTypes(array $types) { |
|
| 84 | - return array_intersect(['calendar', 'calendar_event'], $types); |
|
| 85 | - } |
|
| 78 | + /** |
|
| 79 | + * @param string[] $types |
|
| 80 | + * @return string[] An array of allowed apps from which activities should be displayed |
|
| 81 | + * @since 11.0.0 |
|
| 82 | + */ |
|
| 83 | + public function filterTypes(array $types) { |
|
| 84 | + return array_intersect(['calendar', 'calendar_event'], $types); |
|
| 85 | + } |
|
| 86 | 86 | |
| 87 | - /** |
|
| 88 | - * @return string[] An array of allowed apps from which activities should be displayed |
|
| 89 | - * @since 11.0.0 |
|
| 90 | - */ |
|
| 91 | - public function allowedApps() { |
|
| 92 | - return []; |
|
| 93 | - } |
|
| 87 | + /** |
|
| 88 | + * @return string[] An array of allowed apps from which activities should be displayed |
|
| 89 | + * @since 11.0.0 |
|
| 90 | + */ |
|
| 91 | + public function allowedApps() { |
|
| 92 | + return []; |
|
| 93 | + } |
|
| 94 | 94 | } |
@@ -30,19 +30,19 @@ |
||
| 30 | 30 | |
| 31 | 31 | class CheckBackupCodes implements IRepairStep { |
| 32 | 32 | |
| 33 | - /** @var IJobList */ |
|
| 34 | - private $jobList; |
|
| 33 | + /** @var IJobList */ |
|
| 34 | + private $jobList; |
|
| 35 | 35 | |
| 36 | - public function __construct(IJobList $jobList) { |
|
| 37 | - $this->jobList = $jobList; |
|
| 38 | - } |
|
| 36 | + public function __construct(IJobList $jobList) { |
|
| 37 | + $this->jobList = $jobList; |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - public function getName(): string { |
|
| 41 | - return 'Add background job to check for backup codes'; |
|
| 42 | - } |
|
| 40 | + public function getName(): string { |
|
| 41 | + return 'Add background job to check for backup codes'; |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - public function run(IOutput $output) { |
|
| 45 | - $this->jobList->add(\OCA\TwoFactorBackupCodes\BackgroundJob\CheckBackupCodes::class); |
|
| 46 | - } |
|
| 44 | + public function run(IOutput $output) { |
|
| 45 | + $this->jobList->add(\OCA\TwoFactorBackupCodes\BackgroundJob\CheckBackupCodes::class); |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | 48 | } |
@@ -24,11 +24,11 @@ |
||
| 24 | 24 | <?php if (!is_null($_['backupProvider'])): ?> |
| 25 | 25 | <p> |
| 26 | 26 | <a class="two-factor-secondary" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.showChallenge', |
| 27 | - [ |
|
| 28 | - 'challengeProviderId' => $_['backupProvider']->getId(), |
|
| 29 | - 'redirect_url' => $_['redirect_url'], |
|
| 30 | - ] |
|
| 31 | - )) ?>"> |
|
| 27 | + [ |
|
| 28 | + 'challengeProviderId' => $_['backupProvider']->getId(), |
|
| 29 | + 'redirect_url' => $_['redirect_url'], |
|
| 30 | + ] |
|
| 31 | + )) ?>"> |
|
| 32 | 32 | <?php p($l->t('Use backup code')) ?> |
| 33 | 33 | </a> |
| 34 | 34 | </p> |