chore: Fix php-cs-fixer

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2024-03-27 16:26:27 +01:00
parent 2f6617811c
commit b02989f84c
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
5 changed files with 9 additions and 9 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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());

View File

@ -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;

View File

@ -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 ];