Skip to content

chore: make Forms OpenAPI compliant #25

chore: make Forms OpenAPI compliant

chore: make Forms OpenAPI compliant #25

Triggered via pull request October 29, 2024 10:28
Status Failure
Total duration 2m 33s
Artifacts

psalm-matrix.yml

on: pull_request
Matrix: static-analysis
static-psalm-analysis-summary
5s
static-psalm-analysis-summary
Fit to window
Zoom out
Zoom in

Annotations

11 errors
MoreSpecificReturnType: lib/Controller/ApiController.php#L456
lib/Controller/ApiController.php:456:13: MoreSpecificReturnType: The declared return type 'OCP\AppFramework\Http\DataResponse<201, list<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 more specific than the inferred return type '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/070)
LessSpecificReturnStatement: lib/Controller/ApiController.php#L558
lib/Controller/ApiController.php:558:10: LessSpecificReturnStatement: The type 'OCP\AppFramework\Http\DataResponse<201, array{accept: array<never, never>, options: list<array<array-key, mixed>>, ...<array-key, mixed>}, array<never, never>>' is more general than the declared return type 'OCP\AppFramework\Http\DataResponse<201, list<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/129)
InvalidDocblock: lib/Controller/ApiController.php#L719
lib/Controller/ApiController.php:719:2: InvalidDocblock: Saw : outside of object-like array in docblock for OCA\Forms\Controller\ApiController::reorderQuestions (see https://psalm.dev/008)
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)
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)
InvalidDocblock: lib/Controller/ApiController.php#L1024
lib/Controller/ApiController.php:1024:2: InvalidDocblock: Saw : outside of object-like array in docblock for OCA\Forms\Controller\ApiController::reorderOptions (see https://psalm.dev/008)
MoreSpecificReturnType: lib/Controller/ApiController.php#L1115
lib/Controller/ApiController.php:1115:13: MoreSpecificReturnType: The declared return type 'OCP\AppFramework\Http\DataDownloadResponse<200, 'application/vnd.oasis.opendocument.spreadsheet'|'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'|'text/csv', array<never, never>>|OCP\AppFramework\Http\DataResponse<200, list<array{questions: list<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}>, submissions: list<array{answers: list<array{id: int, questionId: int, submissionId: int, text: string}>, formId: int, id: int, timestamp: int, userDisplayName: string, userId: string}>}>, array<never, never>>' for OCA\Forms\Controller\ApiController::getSubmissions is more specific than the inferred return type 'OCP\AppFramework\Http\DataDownloadResponse<200, 'application/vnd.oasis.opendocument.spreadsheet'|'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'|'text/csv', array<never, never>>|OCP\AppFramework\Http\DataResponse<200, array{questions: array<array-key, mixed>, submissions: array<array-key, mixed>}, array<never, never>>' (see https://psalm.dev/070)
LessSpecificReturnStatement: lib/Controller/ApiController.php#L1171
lib/Controller/ApiController.php:1171:10: LessSpecificReturnStatement: The type 'OCP\AppFramework\Http\DataResponse<200, array{questions: array<array-key, mixed>, submissions: array<array-key, mixed>}, array<never, never>>' is more general than the declared return type 'OCP\AppFramework\Http\DataDownloadResponse<200, 'application/vnd.oasis.opendocument.spreadsheet'|'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'|'text/csv', array<never, never>>|OCP\AppFramework\Http\DataResponse<200, list<array{questions: list<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}>, submissions: list<array{answers: list<array{id: int, questionId: int, submissionId: int, text: string}>, formId: int, id: int, timestamp: int, userDisplayName: string, userId: string}>}>, array<never, never>>' for OCA\Forms\Controller\ApiController::getSubmissions (see https://psalm.dev/129)
static-psalm-analysis-summary
Process completed with exit code 1.