Skip to content

Commit

Permalink
fix php-cs checks
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hartmann <[email protected]>
  • Loading branch information
Chartman123 committed Sep 23, 2024
1 parent b8feb9b commit 9b76aa5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Controller/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,7 @@ public function cloneQuestionLegacy(int $id): DataResponse {
* @throws OCSBadRequestException
* @throws OCSForbiddenException
*/
public function newOptionLegacy(int $questionId, string $text, int|null $order = null): DataResponse {
public function newOptionLegacy(int $questionId, string $text, ?int $order = null): DataResponse {

Check warning on line 2054 in lib/Controller/ApiController.php

View check run for this annotation

Codecov / codecov/patch

lib/Controller/ApiController.php#L2054

Added line #L2054 was not covered by tests
$this->logger->debug('Adding new option: questionId: {questionId}, text: {text}', [
'questionId' => $questionId,
'text' => $text,
Expand Down
4 changes: 2 additions & 2 deletions lib/Db/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class Option extends Entity {

// For 32bit PHP long integers, like IDs, are represented by floats
protected int|float|null $questionId;
protected string|null $text;
protected int|null $order;
protected ?string $text;
protected ?int $order;

/**
* Option constructor.
Expand Down

0 comments on commit 9b76aa5

Please sign in to comment.