@@ -25,36 +25,36 @@ |
||
25 | 25 | |
26 | 26 | class LanguageParseChecker { |
27 | 27 | |
28 | - /** |
|
29 | - * @param string $appId |
|
30 | - * @return array |
|
31 | - */ |
|
32 | - public function analyse($appId) { |
|
33 | - $appPath = \OC_App::getAppPath($appId); |
|
34 | - if ($appPath === false) { |
|
35 | - throw new \RuntimeException("No app with given id <$appId> known."); |
|
36 | - } |
|
37 | - |
|
38 | - if (!is_dir($appPath . '/l10n/')) { |
|
39 | - return []; |
|
40 | - } |
|
41 | - |
|
42 | - $errors = []; |
|
43 | - $directory = new \DirectoryIterator($appPath . '/l10n/'); |
|
44 | - |
|
45 | - foreach ($directory as $file) { |
|
46 | - if ($file->getExtension() !== 'json') { |
|
47 | - continue; |
|
48 | - } |
|
49 | - |
|
50 | - $content = file_get_contents($file->getPathname()); |
|
51 | - json_decode($content, true); |
|
52 | - |
|
53 | - if (json_last_error() !== JSON_ERROR_NONE) { |
|
54 | - $errors[] = 'Invalid language file found: l10n/' . $file->getFilename() . ': ' . json_last_error_msg(); |
|
55 | - } |
|
56 | - } |
|
57 | - |
|
58 | - return $errors; |
|
59 | - } |
|
28 | + /** |
|
29 | + * @param string $appId |
|
30 | + * @return array |
|
31 | + */ |
|
32 | + public function analyse($appId) { |
|
33 | + $appPath = \OC_App::getAppPath($appId); |
|
34 | + if ($appPath === false) { |
|
35 | + throw new \RuntimeException("No app with given id <$appId> known."); |
|
36 | + } |
|
37 | + |
|
38 | + if (!is_dir($appPath . '/l10n/')) { |
|
39 | + return []; |
|
40 | + } |
|
41 | + |
|
42 | + $errors = []; |
|
43 | + $directory = new \DirectoryIterator($appPath . '/l10n/'); |
|
44 | + |
|
45 | + foreach ($directory as $file) { |
|
46 | + if ($file->getExtension() !== 'json') { |
|
47 | + continue; |
|
48 | + } |
|
49 | + |
|
50 | + $content = file_get_contents($file->getPathname()); |
|
51 | + json_decode($content, true); |
|
52 | + |
|
53 | + if (json_last_error() !== JSON_ERROR_NONE) { |
|
54 | + $errors[] = 'Invalid language file found: l10n/' . $file->getFilename() . ': ' . json_last_error_msg(); |
|
55 | + } |
|
56 | + } |
|
57 | + |
|
58 | + return $errors; |
|
59 | + } |
|
60 | 60 | } |
@@ -40,13 +40,13 @@ |
||
40 | 40 | */ |
41 | 41 | class Application extends App { |
42 | 42 | |
43 | - public function __construct() { |
|
44 | - parent::__construct('core'); |
|
43 | + public function __construct() { |
|
44 | + parent::__construct('core'); |
|
45 | 45 | |
46 | - $container = $this->getContainer(); |
|
46 | + $container = $this->getContainer(); |
|
47 | 47 | |
48 | - $container->registerService('defaultMailAddress', function () { |
|
49 | - return Util::getDefaultEmailAddress('lostpassword-noreply'); |
|
50 | - }); |
|
51 | - } |
|
48 | + $container->registerService('defaultMailAddress', function () { |
|
49 | + return Util::getDefaultEmailAddress('lostpassword-noreply'); |
|
50 | + }); |
|
51 | + } |
|
52 | 52 | } |
@@ -22,10 +22,10 @@ |
||
22 | 22 | $dispatcher = \OC::$server->getEventDispatcher(); |
23 | 23 | |
24 | 24 | $dispatcher->addListener('OC\AccountManager::userUpdated', function(\Symfony\Component\EventDispatcher\GenericEvent $event) { |
25 | - /** @var \OCP\IUser $user */ |
|
26 | - $user = $event->getSubject(); |
|
25 | + /** @var \OCP\IUser $user */ |
|
26 | + $user = $event->getSubject(); |
|
27 | 27 | |
28 | - /** @var \OCA\LookupServerConnector\UpdateLookupServer $updateLookupServer */ |
|
29 | - $updateLookupServer = \OC::$server->query(\OCA\LookupServerConnector\UpdateLookupServer::class); |
|
30 | - $updateLookupServer->userUpdated($user); |
|
28 | + /** @var \OCA\LookupServerConnector\UpdateLookupServer $updateLookupServer */ |
|
29 | + $updateLookupServer = \OC::$server->query(\OCA\LookupServerConnector\UpdateLookupServer::class); |
|
30 | + $updateLookupServer->userUpdated($user); |
|
31 | 31 | }); |
@@ -36,108 +36,108 @@ |
||
36 | 36 | * @package OCA\LookupServerConnector |
37 | 37 | */ |
38 | 38 | class UpdateLookupServer { |
39 | - /** @var AccountManager */ |
|
40 | - private $accountManager; |
|
41 | - /** @var IClientService */ |
|
42 | - private $clientService; |
|
43 | - /** @var Signer */ |
|
44 | - private $signer; |
|
45 | - /** @var IJobList */ |
|
46 | - private $jobList; |
|
47 | - /** @var string URL point to lookup server */ |
|
48 | - private $lookupServer; |
|
39 | + /** @var AccountManager */ |
|
40 | + private $accountManager; |
|
41 | + /** @var IClientService */ |
|
42 | + private $clientService; |
|
43 | + /** @var Signer */ |
|
44 | + private $signer; |
|
45 | + /** @var IJobList */ |
|
46 | + private $jobList; |
|
47 | + /** @var string URL point to lookup server */ |
|
48 | + private $lookupServer; |
|
49 | 49 | |
50 | - /** |
|
51 | - * @param AccountManager $accountManager |
|
52 | - * @param IClientService $clientService |
|
53 | - * @param Signer $signer |
|
54 | - * @param IJobList $jobList |
|
55 | - * @param IConfig $config |
|
56 | - */ |
|
57 | - public function __construct(AccountManager $accountManager, |
|
58 | - IClientService $clientService, |
|
59 | - Signer $signer, |
|
60 | - IJobList $jobList, |
|
61 | - IConfig $config) { |
|
62 | - $this->accountManager = $accountManager; |
|
63 | - $this->clientService = $clientService; |
|
64 | - $this->signer = $signer; |
|
65 | - $this->jobList = $jobList; |
|
50 | + /** |
|
51 | + * @param AccountManager $accountManager |
|
52 | + * @param IClientService $clientService |
|
53 | + * @param Signer $signer |
|
54 | + * @param IJobList $jobList |
|
55 | + * @param IConfig $config |
|
56 | + */ |
|
57 | + public function __construct(AccountManager $accountManager, |
|
58 | + IClientService $clientService, |
|
59 | + Signer $signer, |
|
60 | + IJobList $jobList, |
|
61 | + IConfig $config) { |
|
62 | + $this->accountManager = $accountManager; |
|
63 | + $this->clientService = $clientService; |
|
64 | + $this->signer = $signer; |
|
65 | + $this->jobList = $jobList; |
|
66 | 66 | |
67 | - $this->lookupServer = $config->getSystemValue('lookup_server', 'https://lookup.nextcloud.com'); |
|
68 | - $this->lookupServer = rtrim($this->lookupServer, '/'); |
|
69 | - $this->lookupServer .= '/users'; |
|
70 | - } |
|
67 | + $this->lookupServer = $config->getSystemValue('lookup_server', 'https://lookup.nextcloud.com'); |
|
68 | + $this->lookupServer = rtrim($this->lookupServer, '/'); |
|
69 | + $this->lookupServer .= '/users'; |
|
70 | + } |
|
71 | 71 | |
72 | - /** |
|
73 | - * @param IUser $user |
|
74 | - */ |
|
75 | - public function userUpdated(IUser $user) { |
|
76 | - $userData = $this->accountManager->getUser($user); |
|
77 | - $publicData = []; |
|
72 | + /** |
|
73 | + * @param IUser $user |
|
74 | + */ |
|
75 | + public function userUpdated(IUser $user) { |
|
76 | + $userData = $this->accountManager->getUser($user); |
|
77 | + $publicData = []; |
|
78 | 78 | |
79 | - foreach ($userData as $key => $data) { |
|
80 | - if ($data['scope'] === AccountManager::VISIBILITY_PUBLIC) { |
|
81 | - $publicData[$key] = $data; |
|
82 | - } |
|
83 | - } |
|
79 | + foreach ($userData as $key => $data) { |
|
80 | + if ($data['scope'] === AccountManager::VISIBILITY_PUBLIC) { |
|
81 | + $publicData[$key] = $data; |
|
82 | + } |
|
83 | + } |
|
84 | 84 | |
85 | - $this->sendToLookupServer($user, $publicData); |
|
86 | - } |
|
85 | + $this->sendToLookupServer($user, $publicData); |
|
86 | + } |
|
87 | 87 | |
88 | - /** |
|
89 | - * send public user data to the lookup server |
|
90 | - * |
|
91 | - * @param IUser $user |
|
92 | - * @param array $publicData |
|
93 | - */ |
|
94 | - protected function sendToLookupServer(IUser $user, array $publicData) { |
|
88 | + /** |
|
89 | + * send public user data to the lookup server |
|
90 | + * |
|
91 | + * @param IUser $user |
|
92 | + * @param array $publicData |
|
93 | + */ |
|
94 | + protected function sendToLookupServer(IUser $user, array $publicData) { |
|
95 | 95 | |
96 | - $dataArray = ['federationId' => $user->getCloudId()]; |
|
96 | + $dataArray = ['federationId' => $user->getCloudId()]; |
|
97 | 97 | |
98 | - if (!empty($publicData)) { |
|
99 | - $dataArray['name'] = isset($publicData[AccountManager::PROPERTY_DISPLAYNAME]) ? $publicData[AccountManager::PROPERTY_DISPLAYNAME]['value'] : ''; |
|
100 | - $dataArray['email'] = isset($publicData[AccountManager::PROPERTY_EMAIL]) ? $publicData[AccountManager::PROPERTY_EMAIL]['value'] : ''; |
|
101 | - $dataArray['address'] = isset($publicData[AccountManager::PROPERTY_ADDRESS]) ? $publicData[AccountManager::PROPERTY_ADDRESS]['value'] : ''; |
|
102 | - $dataArray['website'] = isset($publicData[AccountManager::PROPERTY_WEBSITE]) ? $publicData[AccountManager::PROPERTY_WEBSITE]['value'] : ''; |
|
103 | - $dataArray['twitter'] = isset($publicData[AccountManager::PROPERTY_TWITTER]) ? $publicData[AccountManager::PROPERTY_TWITTER]['value'] : ''; |
|
104 | - $dataArray['phone'] = isset($publicData[AccountManager::PROPERTY_PHONE]) ? $publicData[AccountManager::PROPERTY_PHONE]['value'] : ''; |
|
105 | - $dataArray['twitter_signature'] = isset($publicData[AccountManager::PROPERTY_TWITTER]['signature']) ? $publicData[AccountManager::PROPERTY_TWITTER]['signature'] : ''; |
|
106 | - $dataArray['website_signature'] = isset($publicData[AccountManager::PROPERTY_WEBSITE]['signature']) ? $publicData[AccountManager::PROPERTY_WEBSITE]['signature'] : ''; |
|
107 | - $dataArray['verificationStatus'] = |
|
108 | - [ |
|
109 | - AccountManager::PROPERTY_WEBSITE => isset($publicData[AccountManager::PROPERTY_WEBSITE]) ? $publicData[AccountManager::PROPERTY_WEBSITE]['verified'] : '', |
|
110 | - AccountManager::PROPERTY_TWITTER => isset($publicData[AccountManager::PROPERTY_TWITTER]) ? $publicData[AccountManager::PROPERTY_TWITTER]['verified'] : '', |
|
111 | - ]; |
|
112 | - } |
|
98 | + if (!empty($publicData)) { |
|
99 | + $dataArray['name'] = isset($publicData[AccountManager::PROPERTY_DISPLAYNAME]) ? $publicData[AccountManager::PROPERTY_DISPLAYNAME]['value'] : ''; |
|
100 | + $dataArray['email'] = isset($publicData[AccountManager::PROPERTY_EMAIL]) ? $publicData[AccountManager::PROPERTY_EMAIL]['value'] : ''; |
|
101 | + $dataArray['address'] = isset($publicData[AccountManager::PROPERTY_ADDRESS]) ? $publicData[AccountManager::PROPERTY_ADDRESS]['value'] : ''; |
|
102 | + $dataArray['website'] = isset($publicData[AccountManager::PROPERTY_WEBSITE]) ? $publicData[AccountManager::PROPERTY_WEBSITE]['value'] : ''; |
|
103 | + $dataArray['twitter'] = isset($publicData[AccountManager::PROPERTY_TWITTER]) ? $publicData[AccountManager::PROPERTY_TWITTER]['value'] : ''; |
|
104 | + $dataArray['phone'] = isset($publicData[AccountManager::PROPERTY_PHONE]) ? $publicData[AccountManager::PROPERTY_PHONE]['value'] : ''; |
|
105 | + $dataArray['twitter_signature'] = isset($publicData[AccountManager::PROPERTY_TWITTER]['signature']) ? $publicData[AccountManager::PROPERTY_TWITTER]['signature'] : ''; |
|
106 | + $dataArray['website_signature'] = isset($publicData[AccountManager::PROPERTY_WEBSITE]['signature']) ? $publicData[AccountManager::PROPERTY_WEBSITE]['signature'] : ''; |
|
107 | + $dataArray['verificationStatus'] = |
|
108 | + [ |
|
109 | + AccountManager::PROPERTY_WEBSITE => isset($publicData[AccountManager::PROPERTY_WEBSITE]) ? $publicData[AccountManager::PROPERTY_WEBSITE]['verified'] : '', |
|
110 | + AccountManager::PROPERTY_TWITTER => isset($publicData[AccountManager::PROPERTY_TWITTER]) ? $publicData[AccountManager::PROPERTY_TWITTER]['verified'] : '', |
|
111 | + ]; |
|
112 | + } |
|
113 | 113 | |
114 | - $dataArray = $this->signer->sign('lookupserver', $dataArray, $user); |
|
115 | - $httpClient = $this->clientService->newClient(); |
|
116 | - try { |
|
117 | - if (empty($publicData)) { |
|
118 | - $httpClient->delete($this->lookupServer, |
|
119 | - [ |
|
120 | - 'body' => json_encode($dataArray), |
|
121 | - 'timeout' => 10, |
|
122 | - 'connect_timeout' => 3, |
|
123 | - ] |
|
124 | - ); |
|
125 | - } else { |
|
126 | - $httpClient->post($this->lookupServer, |
|
127 | - [ |
|
128 | - 'body' => json_encode($dataArray), |
|
129 | - 'timeout' => 10, |
|
130 | - 'connect_timeout' => 3, |
|
131 | - ] |
|
132 | - ); |
|
133 | - } |
|
134 | - } catch (\Exception $e) { |
|
135 | - $this->jobList->add(RetryJob::class, |
|
136 | - [ |
|
137 | - 'dataArray' => $dataArray, |
|
138 | - 'retryNo' => 0, |
|
139 | - ] |
|
140 | - ); |
|
141 | - } |
|
142 | - } |
|
114 | + $dataArray = $this->signer->sign('lookupserver', $dataArray, $user); |
|
115 | + $httpClient = $this->clientService->newClient(); |
|
116 | + try { |
|
117 | + if (empty($publicData)) { |
|
118 | + $httpClient->delete($this->lookupServer, |
|
119 | + [ |
|
120 | + 'body' => json_encode($dataArray), |
|
121 | + 'timeout' => 10, |
|
122 | + 'connect_timeout' => 3, |
|
123 | + ] |
|
124 | + ); |
|
125 | + } else { |
|
126 | + $httpClient->post($this->lookupServer, |
|
127 | + [ |
|
128 | + 'body' => json_encode($dataArray), |
|
129 | + 'timeout' => 10, |
|
130 | + 'connect_timeout' => 3, |
|
131 | + ] |
|
132 | + ); |
|
133 | + } |
|
134 | + } catch (\Exception $e) { |
|
135 | + $this->jobList->add(RetryJob::class, |
|
136 | + [ |
|
137 | + 'dataArray' => $dataArray, |
|
138 | + 'retryNo' => 0, |
|
139 | + ] |
|
140 | + ); |
|
141 | + } |
|
142 | + } |
|
143 | 143 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $files_list = json_decode($files); |
38 | 38 | // in case we get only a single file |
39 | 39 | if (!is_array($files_list)) { |
40 | - $files_list = array($files); |
|
40 | + $files_list = array($files); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | * alphanumeric characters |
47 | 47 | */ |
48 | 48 | if(isset($_GET['downloadStartSecret']) |
49 | - && !isset($_GET['downloadStartSecret'][32]) |
|
50 | - && preg_match('!^[a-zA-Z0-9]+$!', $_GET['downloadStartSecret']) === 1) { |
|
51 | - setcookie('ocDownloadStarted', $_GET['downloadStartSecret'], time() + 20, '/'); |
|
49 | + && !isset($_GET['downloadStartSecret'][32]) |
|
50 | + && preg_match('!^[a-zA-Z0-9]+$!', $_GET['downloadStartSecret']) === 1) { |
|
51 | + setcookie('ocDownloadStarted', $_GET['downloadStartSecret'], time() + 20, '/'); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | $server_params = array( 'head' => \OC::$server->getRequest()->getMethod() === 'HEAD' ); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * Http range requests support |
58 | 58 | */ |
59 | 59 | if (isset($_SERVER['HTTP_RANGE'])) { |
60 | - $server_params['range'] = \OC::$server->getRequest()->getHeader('Range'); |
|
60 | + $server_params['range'] = \OC::$server->getRequest()->getHeader('Range'); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | OC_Files::get($dir, $files_list, $server_params); |
@@ -36,62 +36,62 @@ |
||
36 | 36 | */ |
37 | 37 | class SetPasswordColumn implements IRepairStep { |
38 | 38 | |
39 | - /** @var IDBConnection */ |
|
40 | - private $connection; |
|
41 | - |
|
42 | - /** @var IConfig */ |
|
43 | - private $config; |
|
44 | - |
|
45 | - |
|
46 | - public function __construct(IDBConnection $connection, IConfig $config) { |
|
47 | - $this->connection = $connection; |
|
48 | - $this->config = $config; |
|
49 | - } |
|
50 | - |
|
51 | - /** |
|
52 | - * Returns the step's name |
|
53 | - * |
|
54 | - * @return string |
|
55 | - * @since 9.1.0 |
|
56 | - */ |
|
57 | - public function getName() { |
|
58 | - return 'Copy the share password into the dedicated column'; |
|
59 | - } |
|
60 | - |
|
61 | - /** |
|
62 | - * @param IOutput $output |
|
63 | - */ |
|
64 | - public function run(IOutput $output) { |
|
65 | - if (!$this->shouldRun()) { |
|
66 | - return; |
|
67 | - } |
|
68 | - |
|
69 | - $query = $this->connection->getQueryBuilder(); |
|
70 | - $query |
|
71 | - ->update('share') |
|
72 | - ->set('password', 'share_with') |
|
73 | - ->where($query->expr()->eq('share_type', $query->createNamedParameter(Share::SHARE_TYPE_LINK))) |
|
74 | - ->andWhere($query->expr()->isNotNull('share_with')); |
|
75 | - $result = $query->execute(); |
|
76 | - |
|
77 | - if ($result === 0) { |
|
78 | - // No link updated, no need to run the second query |
|
79 | - return; |
|
80 | - } |
|
81 | - |
|
82 | - $clearQuery = $this->connection->getQueryBuilder(); |
|
83 | - $clearQuery |
|
84 | - ->update('share') |
|
85 | - ->set('share_with', $clearQuery->createNamedParameter(null)) |
|
86 | - ->where($clearQuery->expr()->eq('share_type', $clearQuery->createNamedParameter(Share::SHARE_TYPE_LINK))); |
|
87 | - |
|
88 | - $clearQuery->execute(); |
|
89 | - |
|
90 | - } |
|
91 | - |
|
92 | - protected function shouldRun() { |
|
93 | - $appVersion = $this->config->getAppValue('files_sharing', 'installed_version', '0.0.0'); |
|
94 | - return version_compare($appVersion, '1.4.0', '<'); |
|
95 | - } |
|
39 | + /** @var IDBConnection */ |
|
40 | + private $connection; |
|
41 | + |
|
42 | + /** @var IConfig */ |
|
43 | + private $config; |
|
44 | + |
|
45 | + |
|
46 | + public function __construct(IDBConnection $connection, IConfig $config) { |
|
47 | + $this->connection = $connection; |
|
48 | + $this->config = $config; |
|
49 | + } |
|
50 | + |
|
51 | + /** |
|
52 | + * Returns the step's name |
|
53 | + * |
|
54 | + * @return string |
|
55 | + * @since 9.1.0 |
|
56 | + */ |
|
57 | + public function getName() { |
|
58 | + return 'Copy the share password into the dedicated column'; |
|
59 | + } |
|
60 | + |
|
61 | + /** |
|
62 | + * @param IOutput $output |
|
63 | + */ |
|
64 | + public function run(IOutput $output) { |
|
65 | + if (!$this->shouldRun()) { |
|
66 | + return; |
|
67 | + } |
|
68 | + |
|
69 | + $query = $this->connection->getQueryBuilder(); |
|
70 | + $query |
|
71 | + ->update('share') |
|
72 | + ->set('password', 'share_with') |
|
73 | + ->where($query->expr()->eq('share_type', $query->createNamedParameter(Share::SHARE_TYPE_LINK))) |
|
74 | + ->andWhere($query->expr()->isNotNull('share_with')); |
|
75 | + $result = $query->execute(); |
|
76 | + |
|
77 | + if ($result === 0) { |
|
78 | + // No link updated, no need to run the second query |
|
79 | + return; |
|
80 | + } |
|
81 | + |
|
82 | + $clearQuery = $this->connection->getQueryBuilder(); |
|
83 | + $clearQuery |
|
84 | + ->update('share') |
|
85 | + ->set('share_with', $clearQuery->createNamedParameter(null)) |
|
86 | + ->where($clearQuery->expr()->eq('share_type', $clearQuery->createNamedParameter(Share::SHARE_TYPE_LINK))); |
|
87 | + |
|
88 | + $clearQuery->execute(); |
|
89 | + |
|
90 | + } |
|
91 | + |
|
92 | + protected function shouldRun() { |
|
93 | + $appVersion = $this->config->getAppValue('files_sharing', 'installed_version', '0.0.0'); |
|
94 | + return version_compare($appVersion, '1.4.0', '<'); |
|
95 | + } |
|
96 | 96 | |
97 | 97 | } |
@@ -28,26 +28,26 @@ |
||
28 | 28 | use OCP\ILogger; |
29 | 29 | |
30 | 30 | class CategoryFetcher extends Fetcher { |
31 | - /** |
|
32 | - * @param Factory $appDataFactory |
|
33 | - * @param IClientService $clientService |
|
34 | - * @param ITimeFactory $timeFactory |
|
35 | - * @param IConfig $config |
|
36 | - * @param ILogger $logger |
|
37 | - */ |
|
38 | - public function __construct(Factory $appDataFactory, |
|
39 | - IClientService $clientService, |
|
40 | - ITimeFactory $timeFactory, |
|
41 | - IConfig $config, |
|
42 | - ILogger $logger) { |
|
43 | - parent::__construct( |
|
44 | - $appDataFactory, |
|
45 | - $clientService, |
|
46 | - $timeFactory, |
|
47 | - $config, |
|
48 | - $logger |
|
49 | - ); |
|
50 | - $this->fileName = 'categories.json'; |
|
51 | - $this->endpointUrl = 'https://apps.nextcloud.com/api/v1/categories.json'; |
|
52 | - } |
|
31 | + /** |
|
32 | + * @param Factory $appDataFactory |
|
33 | + * @param IClientService $clientService |
|
34 | + * @param ITimeFactory $timeFactory |
|
35 | + * @param IConfig $config |
|
36 | + * @param ILogger $logger |
|
37 | + */ |
|
38 | + public function __construct(Factory $appDataFactory, |
|
39 | + IClientService $clientService, |
|
40 | + ITimeFactory $timeFactory, |
|
41 | + IConfig $config, |
|
42 | + ILogger $logger) { |
|
43 | + parent::__construct( |
|
44 | + $appDataFactory, |
|
45 | + $clientService, |
|
46 | + $timeFactory, |
|
47 | + $config, |
|
48 | + $logger |
|
49 | + ); |
|
50 | + $this->fileName = 'categories.json'; |
|
51 | + $this->endpointUrl = 'https://apps.nextcloud.com/api/v1/categories.json'; |
|
52 | + } |
|
53 | 53 | } |
@@ -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 | } |
@@ -34,20 +34,20 @@ |
||
34 | 34 | * @method void setHashedCode(string $token) |
35 | 35 | */ |
36 | 36 | class AccessToken extends Entity { |
37 | - /** @var int */ |
|
38 | - protected $tokenId; |
|
39 | - /** @var int */ |
|
40 | - protected $clientId; |
|
41 | - /** @var string */ |
|
42 | - protected $hashedCode; |
|
43 | - /** @var string */ |
|
44 | - protected $encryptedToken; |
|
37 | + /** @var int */ |
|
38 | + protected $tokenId; |
|
39 | + /** @var int */ |
|
40 | + protected $clientId; |
|
41 | + /** @var string */ |
|
42 | + protected $hashedCode; |
|
43 | + /** @var string */ |
|
44 | + protected $encryptedToken; |
|
45 | 45 | |
46 | - public function __construct() { |
|
47 | - $this->addType('id', 'int'); |
|
48 | - $this->addType('token_id', 'int'); |
|
49 | - $this->addType('client_id', 'int'); |
|
50 | - $this->addType('hashed_code', 'string'); |
|
51 | - $this->addType('encrypted_token', 'string'); |
|
52 | - } |
|
46 | + public function __construct() { |
|
47 | + $this->addType('id', 'int'); |
|
48 | + $this->addType('token_id', 'int'); |
|
49 | + $this->addType('client_id', 'int'); |
|
50 | + $this->addType('hashed_code', 'string'); |
|
51 | + $this->addType('encrypted_token', 'string'); |
|
52 | + } |
|
53 | 53 | } |