Skip to content

Commit

Permalink
fixed phpstan
Browse files Browse the repository at this point in the history
Signed-off-by: Kiran Parajuli <kiranparajuli589@gmail.com>
  • Loading branch information
kiranparajuli589 committed Mar 22, 2022
1 parent 987fe93 commit b4f2be1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/lib/Service/OpenProjectAPIServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ public function getOpenProjectOauthURLDataProvider() {
* @dataProvider getOpenProjectOauthURLDataProvider
*/
public function testGetOpenProjectOauthURLWithInvalidAdminConfig(
$clientId, $clientSecret, $oauthInstanceUrl
string $clientId, string $clientSecret, string $oauthInstanceUrl
) {
$url = $this->createMock(IURLGenerator::class);
$configMock = $this->getMockBuilder(IConfig::class)->getMock();
Expand Down
13 changes: 7 additions & 6 deletions tests/lib/Settings/PersonalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IConfig;
use OCP\IURLGenerator;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

class PersonalTest extends TestCase {
Expand All @@ -22,25 +23,25 @@ class PersonalTest extends TestCase {
private $setting;

/**
* @var IConfig
* @var MockObject | IConfig
*/
private $config;

/**
* @var IInitialState
* @var MockObject | IInitialState
*/
private $initialState;

/**
* @var IURLGenerator
* @var MockObject | IURLGenerator
*/
private $url;

protected function setUp(): void {
parent::setUp();
$this->config = $this->createMock(IConfig::class);
$this->initialState = $this->createMock(IInitialState::class);
$this->url = $this->createMock(IURLGenerator::class);
$this->config = $this->getMockBuilder(IConfig::class)->getMock();
$this->initialState = $this->getMockBuilder(IInitialState::class)->getMock();
$this->url = $this->getMockBuilder(IURLGenerator::class)->getMock();
$this->setting = new Personal($this->config, $this->initialState, $this->url, "testUser");
}

Expand Down

0 comments on commit b4f2be1

Please sign in to comment.