chore: Fix php-cs-fixer
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
2f6617811c
commit
b02989f84c
|
@ -55,7 +55,7 @@ class Helper {
|
|||
return $note;
|
||||
}
|
||||
|
||||
public function getNoteData(Note $note, array $exclude = [], Meta $meta = null) : array {
|
||||
public function getNoteData(Note $note, array $exclude = [], ?Meta $meta = null) : array {
|
||||
if ($meta === null) {
|
||||
$meta = $this->metaService->update($this->getUID(), $note);
|
||||
}
|
||||
|
@ -67,9 +67,9 @@ class Helper {
|
|||
public function getNotesAndCategories(
|
||||
int $pruneBefore,
|
||||
array $exclude,
|
||||
string $category = null,
|
||||
?string $category = null,
|
||||
int $chunkSize = 0,
|
||||
string $chunkCursorStr = null
|
||||
?string $chunkCursorStr = null
|
||||
) : array {
|
||||
$userId = $this->getUID();
|
||||
$chunkCursor = $chunkCursorStr ? ChunkCursor::fromString($chunkCursorStr) : null;
|
||||
|
|
|
@ -46,7 +46,7 @@ class NotesApiController extends ApiController {
|
|||
string $exclude = '',
|
||||
int $pruneBefore = 0,
|
||||
int $chunkSize = 0,
|
||||
string $chunkCursor = null
|
||||
?string $chunkCursor = null
|
||||
) : JSONResponse {
|
||||
return $this->helper->handleErrorResponse(function () use (
|
||||
$category,
|
||||
|
|
|
@ -131,7 +131,7 @@ class MetaService {
|
|||
return $result;
|
||||
}
|
||||
|
||||
private function createMeta(string $userId, Note $note, callable $onError = null) : Meta {
|
||||
private function createMeta(string $userId, Note $note, ?callable $onError = null) : Meta {
|
||||
$meta = new Meta();
|
||||
$meta->setUserId($userId);
|
||||
$meta->setFileId($note->getId());
|
||||
|
|
|
@ -74,7 +74,7 @@ class APIv1Test extends CommonAPITest {
|
|||
array $indexedRefNotes,
|
||||
int $chunkSize,
|
||||
string $messagePrefix,
|
||||
string $chunkCursor = null,
|
||||
?string $chunkCursor = null,
|
||||
array $collectedNotes = []
|
||||
) : array {
|
||||
$requestCount = 0;
|
||||
|
|
|
@ -69,7 +69,7 @@ abstract class AbstractAPITest extends TestCase {
|
|||
string $message,
|
||||
?string $param = '',
|
||||
array $expectExclude = [],
|
||||
array $expectedFullNotes = null
|
||||
?array $expectedFullNotes = null
|
||||
) : void {
|
||||
$messagePrefix = 'Check reference notes '.$message;
|
||||
$response = $this->http->request('GET', 'notes' . $param);
|
||||
|
@ -83,7 +83,7 @@ abstract class AbstractAPITest extends TestCase {
|
|||
array $notes,
|
||||
string $messagePrefix,
|
||||
array $expectExclude = [],
|
||||
array $expectedFullNotes = null
|
||||
?array $expectedFullNotes = null
|
||||
) : void {
|
||||
$this->assertIsArray($notes, $messagePrefix);
|
||||
$notesMap = $this->getNotesIdMap($notes, $messagePrefix);
|
||||
|
@ -204,7 +204,7 @@ abstract class AbstractAPITest extends TestCase {
|
|||
\stdClass &$note,
|
||||
\stdClass $request,
|
||||
\stdClass $expected,
|
||||
string $etag = null,
|
||||
?string $etag = null,
|
||||
int $statusExp = 200
|
||||
) {
|
||||
$requestOptions = [ 'json' => $request ];
|
||||
|
|
Loading…
Reference in New Issue