Browse Source
Fix psalm ci (stub). Wrap server container with try-catch
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
pull/39655/head
Andrey Borysenko
2 years ago
No known key found for this signature in database
GPG Key ID: 934CB29F9F59B0D1
3 changed files with
22 additions and
2 deletions
-
build/stubs/app_ecosystem_v2.php
-
lib/base.php
-
psalm.xml
|
|
|
@ -0,0 +1,15 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
namespace OCA\AppEcosystemV2\Service; |
|
|
|
|
|
|
|
use OCP\IRequest; |
|
|
|
|
|
|
|
class AppEcosystemV2Service { |
|
|
|
/** |
|
|
|
* @param IRequest $request |
|
|
|
* @param bool $isDav |
|
|
|
* |
|
|
|
* @return bool |
|
|
|
*/ |
|
|
|
public function validateExAppRequestToNC(IRequest $request, bool $isDav = false): bool {} |
|
|
|
} |
|
|
|
@ -1187,8 +1187,12 @@ class OC { |
|
|
|
if (!$appManager->isInstalled('app_ecosystem_v2')) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
$appEcosystemV2Service = Server::get(OCA\AppEcosystemV2\Service\AppEcosystemV2Service::class); |
|
|
|
return $appEcosystemV2Service->validateExAppRequestToNC($request); |
|
|
|
try { |
|
|
|
$appEcosystemV2Service = Server::get(OCA\AppEcosystemV2\Service\AppEcosystemV2Service::class); |
|
|
|
return $appEcosystemV2Service->validateExAppRequestToNC($request); |
|
|
|
} catch (\Psr\Container\NotFoundExceptionInterface|\Psr\Container\ContainerExceptionInterface $e) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -81,6 +81,7 @@ |
|
|
|
<file name="build/stubs/zip.php"/> |
|
|
|
<file name="build/stubs/psr_container.php"/> |
|
|
|
<file name="3rdparty/sabre/uri/lib/functions.php" /> |
|
|
|
<file name="build/stubs/app_ecosystem_v2.php" /> |
|
|
|
</stubs> |
|
|
|
<issueHandlers> |
|
|
|
<LessSpecificReturnStatement errorLevel="error"/> |
|
|
|
|