chore: make Forms OpenAPI compliant #17
psalm-matrix.yml
on: pull_request
matrix
11s
Matrix: static-analysis
static-psalm-analysis-summary
4s
Annotations
11 errors
InvalidReturnType:
lib/Controller/ApiController.php#L456
lib/Controller/ApiController.php:456:13: InvalidReturnType: The declared return type 'OCP\AppFramework\Http\DataResponse<201, array{accept?: list<string>|null, description: string, extraSettings: array{0?: never, allowOtherAnswer?: bool|null, allowedFileExtensions?: list<string>|null, allowedFileTypes?: list<string>|null, maxAllowedFilesCount?: int|null, maxFileSize?: int|null, optionsLimitMax?: int|null, optionsLimitMin?: int|null, shuffleOptions?: bool|null, validationRegex?: null|string, validationType?: null|string, ...<int<0, max>, never>}, formId: int, id: int, isRequired: bool, name: string, options: list<array{id: int, order: int|null, questionId: int, text: string}>|null, order: int, text: string, type: string}, array<never, never>>' for OCA\Forms\Controller\ApiController::newQuestion is incorrect, got 'OCP\AppFramework\Http\DataResponse<201, array{accept: array<never, never>, options: list<array<array-key, mixed>>, ...<array-key, mixed>}, array<never, never>>' (see https://psalm.dev/011)
|
InvalidReturnStatement:
lib/Controller/ApiController.php#L558
lib/Controller/ApiController.php:558:10: InvalidReturnStatement: The inferred type 'OCP\AppFramework\Http\DataResponse<201, array{accept: array<never, never>, options: list<array<array-key, mixed>>, ...<array-key, mixed>}, array<never, never>>' does not match the declared return type 'OCP\AppFramework\Http\DataResponse<201, array{accept?: list<string>|null, description: string, extraSettings: array{0?: never, allowOtherAnswer?: bool|null, allowedFileExtensions?: list<string>|null, allowedFileTypes?: list<string>|null, maxAllowedFilesCount?: int|null, maxFileSize?: int|null, optionsLimitMax?: int|null, optionsLimitMin?: int|null, shuffleOptions?: bool|null, validationRegex?: null|string, validationType?: null|string, ...<int<0, max>, never>}, formId: int, id: int, isRequired: bool, name: string, options: list<array{id: int, order: int|null, questionId: int, text: string}>|null, order: int, text: string, type: string}, array<never, never>>' for OCA\Forms\Controller\ApiController::newQuestion (see https://psalm.dev/128)
|
InvalidReturnType:
lib/Controller/ApiController.php#L707
lib/Controller/ApiController.php:707:13: InvalidReturnType: The declared return type 'OCP\AppFramework\Http\DataResponse<200, array<string, int>, array<never, never>>' for OCA\Forms\Controller\ApiController::reorderQuestions is incorrect, got 'OCP\AppFramework\Http\DataResponse<200, array<int, array{order: int}>, array<never, never>>' (see https://psalm.dev/011)
|
InvalidOperand:
lib/Controller/ApiController.php#L779
lib/Controller/ApiController.php:779:22: InvalidOperand: Cannot perform a numeric operation with a non-numeric type string (see https://psalm.dev/058)
|
InvalidOperand:
lib/Controller/ApiController.php#L781
lib/Controller/ApiController.php:781:37: InvalidOperand: Cannot perform a numeric operation with a non-numeric type string (see https://psalm.dev/058)
|
InvalidReturnStatement:
lib/Controller/ApiController.php#L796
lib/Controller/ApiController.php:796:10: InvalidReturnStatement: The inferred type 'OCP\AppFramework\Http\DataResponse<200, array<int, array{order: int}>, array<never, never>>' does not match the declared return type 'OCP\AppFramework\Http\DataResponse<200, array<string, int>, array<never, never>>' for OCA\Forms\Controller\ApiController::reorderQuestions (see https://psalm.dev/128)
|
TypeDoesNotContainType:
lib/Controller/ApiController.php#L927
lib/Controller/ApiController.php:927:7: TypeDoesNotContainType: 2 cannot be identical to 0 (see https://psalm.dev/056)
|
TypeDoesNotContainType:
lib/Controller/ApiController.php#L927
lib/Controller/ApiController.php:927:7: TypeDoesNotContainType: Type array{key: string, value: mixed} for $keyValuePairs is always !non-empty-countable (see https://psalm.dev/056)
|
InvalidReturnType:
lib/Controller/ApiController.php#L1012
lib/Controller/ApiController.php:1012:13: InvalidReturnType: The declared return type 'OCP\AppFramework\Http\DataResponse<200, array<string, int>, array<never, never>>' for OCA\Forms\Controller\ApiController::reorderOptions is incorrect, got 'OCP\AppFramework\Http\DataResponse<200, array<numeric-string, array{order: int}>, array<never, never>>' (see https://psalm.dev/011)
|
InvalidReturnStatement:
lib/Controller/ApiController.php#L1101
lib/Controller/ApiController.php:1101:10: InvalidReturnStatement: The inferred type 'OCP\AppFramework\Http\DataResponse<200, array<numeric-string, array{order: int}>, array<never, never>>' does not match the declared return type 'OCP\AppFramework\Http\DataResponse<200, array<string, int>, array<never, never>>' for OCA\Forms\Controller\ApiController::reorderOptions (see https://psalm.dev/128)
|
static-psalm-analysis-summary
Process completed with exit code 1.
|