Refactor update to have proper order of optional parameters
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<files psalm-version="4.7.0@d4377c0baf3ffbf0b1ec6998e8d1be2a40971005">
|
||||
<files psalm-version="4.7.2@83a0325c0a95c0ab531d6b90c877068b464377b5">
|
||||
<file src="lib/Activity/ActivityManager.php">
|
||||
<TypeDoesNotContainType occurrences="1">
|
||||
<code>$message !== null</code>
|
||||
@@ -197,9 +197,6 @@
|
||||
</TooManyArguments>
|
||||
</file>
|
||||
<file src="lib/Service/CardService.php">
|
||||
<TooFewArguments occurrences="1">
|
||||
<code>findAssignedCards</code>
|
||||
</TooFewArguments>
|
||||
<UndefinedDocblockClass occurrences="1">
|
||||
<code>\OCP\AppFramework\Db\</code>
|
||||
</UndefinedDocblockClass>
|
||||
|
||||
@@ -196,7 +196,7 @@ class CardServiceTest extends TestCase {
|
||||
$this->cardMapper->expects($this->once())->method('update')->willReturnCallback(function ($c) {
|
||||
return $c;
|
||||
});
|
||||
$actual = $this->cardService->update(123, 'newtitle', 234, 'text', 999, 'foo', 'admin', '2017-01-01 00:00:00', null);
|
||||
$actual = $this->cardService->update(123, 'newtitle', 234, 'text', 'admin', 'foo', 999, '2017-01-01 00:00:00', null);
|
||||
$this->assertEquals('newtitle', $actual->getTitle());
|
||||
$this->assertEquals(234, $actual->getStackId());
|
||||
$this->assertEquals('text', $actual->getType());
|
||||
@@ -212,7 +212,7 @@ class CardServiceTest extends TestCase {
|
||||
$this->cardMapper->expects($this->once())->method('find')->willReturn($card);
|
||||
$this->cardMapper->expects($this->never())->method('update');
|
||||
$this->expectException(StatusException::class);
|
||||
$this->cardService->update(123, 'newtitle', 234, 'text', 999, 'foo', 'admin', '2017-01-01 00:00:00', null, true);
|
||||
$this->cardService->update(123, 'newtitle', 234, 'text', 'admin', 'foo', 999, '2017-01-01 00:00:00', null, true);
|
||||
}
|
||||
|
||||
public function testRename() {
|
||||
|
||||
@@ -75,7 +75,7 @@ class CardControllerTest extends TestCase {
|
||||
public function testUpdate() {
|
||||
$this->cardService->expects($this->once())
|
||||
->method('update')
|
||||
->with(1, 'title', 3, 'text', 5, 'foo', $this->userId, '2017-01-01 00:00:00')
|
||||
->with(1, 'title', 3, 'text', $this->userId, 'foo', 5, '2017-01-01 00:00:00')
|
||||
->willReturn(1);
|
||||
$this->assertEquals(1, $this->controller->update(1, 'title', 3, 'text', 5, 'foo', '2017-01-01 00:00:00', null));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user