Skip to content

Commit

Permalink
fix phpstan issues
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Neumann <artur@jankaritech.com>
  • Loading branch information
individual-it committed Feb 7, 2022
1 parent f296409 commit f7b492b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
} else {
$serverPath = __DIR__ . '/../..';
}
include_once $serverPath.'/3rdparty/autoload.php';

$classLoader = new ClassLoader();
$classLoader->addPsr4("OCA\\OpenProject\\Service\\", __DIR__ . '/lib/Service', true);
$classLoader->addPsr4("OCP\\", $serverPath . '/lib/public', true);
$classLoader->addPsr4("OC\\", $serverPath . '/lib/private', true);
$classLoader->addPsr4("OCA\\Files\\Event\\", $serverPath . '/apps/files/lib/Event', true);
$classLoader->addPsr4("OCA\\OpenProject\\AppInfo\\", __DIR__ . '/lib/AppInfo', true);
$classLoader->addPsr4("OCA\\OpenProject\\Controller\\", __DIR__ . '/lib/Controller', true);
$classLoader->register();
Expand Down
7 changes: 7 additions & 0 deletions tests/lib/Controller/ConfigControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ class ConfigControllerTest extends TestCase
*/
private IConfig $configMock;

/**
* @var ConfigController
*/
private $configController;
/**
* @return void
* @before
Expand Down Expand Up @@ -147,6 +151,9 @@ public function testOauthNoAccessTokenInResponse($oauthResponse, $expectedRedire
->method('requestOAuthAccessToken')
->willReturn($oauthResponse);

/**
* @var ConfigController
*/
$configController = new ConfigController(
'integration_openproject',
$this->createMock(IRequest::class),
Expand Down
1 change: 1 addition & 0 deletions tests/lib/Controller/OpenProjectAPIControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function setUpMocks(): void {
}

public function getUserValueMock($token = '123') {
// @phpstan-ignore-next-line
$this->configMock
->method('getUserValue')
->withConsecutive(
Expand Down
1 change: 1 addition & 0 deletions tests/lib/Service/OpenProjectAPIServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function setUpMocks(): void {
$config = $this->createMock(IConfig::class);
/** @var ICertificateManager $certificateManager */
$certificateManager = $this->getMockBuilder('\OCP\ICertificateManager')->getMock();
// @phpstan-ignore-next-line
$certificateManager->method('getAbsoluteBundlePath')->willReturn('/');
$logger = $this->createMock(ILogger::class);

Expand Down

0 comments on commit f7b492b

Please sign in to comment.