Skip to content

Conditional Logic #1450

Conditional Logic

Conditional Logic #1450

Triggered via pull request January 18, 2026 18:46
Status Failure
Total duration 6m 40s
Artifacts

psalm-matrix.yml

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

Annotations

11 errors
static-psalm-analysis dev-stable31
Process completed with exit code 2.
LessSpecificReturnStatement: lib/Db/Question.php#L101
lib/Db/Question.php:101:10: LessSpecificReturnStatement: The type 'array{branchId: null|string, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}, formId: int, id: int, isRequired: bool, name: string, order: int, parentQuestionId: int|null, text: string, type: 'color'|'conditional'|'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}' is more general than the declared return type 'array{branchId: null|string, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}, formId: int, id: int, isRequired: bool, name: string, order: int, parentQuestionId: int|null, text: string, type: 'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}' for OCA\Forms\Db\Question::read (see https://psalm.dev/129)
MoreSpecificReturnType: lib/Db/Question.php#L86
lib/Db/Question.php:86:13: MoreSpecificReturnType: The declared return type 'array{branchId: null|string, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}, formId: int, id: int, isRequired: bool, name: string, order: int, parentQuestionId: int|null, text: string, type: 'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}' for OCA\Forms\Db\Question::read is more specific than the inferred return type 'array{branchId: null|string, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}, formId: int, id: int, isRequired: bool, name: string, order: int, parentQuestionId: int|null, text: string, type: 'color'|'conditional'|'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}' (see https://psalm.dev/070)
InvalidReturnStatement: lib/Controller/ApiController.php#L611
lib/Controller/ApiController.php:611:10: InvalidReturnStatement: The inferred type 'OCP\AppFramework\Http\DataResponse<201, array{accept: array<never, never>, branchId?: null|string, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}|stdClass, formId: int, id: int, isRequired: bool, name: string, options: list<array{id: int, order: int|null, questionId: float|int, text: string}>, order: int, parentQuestionId?: int|null, text: string, type: 'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}, array<never, never>>' does not match the declared return type 'OCP\AppFramework\Http\DataResponse<201, array{accept: list<string>, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}|stdClass, formId: int, id: int, isRequired: bool, name: string, options: list<array{id: int, order: int|null, questionId: float|int, text: string}>, order: int, text: string, type: 'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}, array<never, never>>' for OCA\Forms\Controller\ApiController::newQuestion (see https://psalm.dev/128)
InvalidReturnType: lib/Controller/ApiController.php#L452
lib/Controller/ApiController.php:452:13: InvalidReturnType: The declared return type 'OCP\AppFramework\Http\DataResponse<201, array{accept: list<string>, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}|stdClass, formId: int, id: int, isRequired: bool, name: string, options: list<array{id: int, order: int|null, questionId: float|int, text: string}>, order: int, text: string, type: 'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}, array<never, never>>' for OCA\Forms\Controller\ApiController::newQuestion is incorrect, got 'OCP\AppFramework\Http\DataResponse<201, array{accept: array<never, never>, branchId?: null|string, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}|stdClass, formId: int, id: int, isRequired: bool, name: string, options: list<array{id: int, order: int|null, questionId: float|int, text: string}>, order: int, parentQuestionId?: int|null, text: string, type: 'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}, array<never, never>>' (see https://psalm.dev/011)
static-psalm-analysis dev-stable32
Process completed with exit code 2.
LessSpecificReturnStatement: lib/Db/Question.php#L101
lib/Db/Question.php:101:10: LessSpecificReturnStatement: The type 'array{branchId: null|string, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}, formId: int, id: int, isRequired: bool, name: string, order: int, parentQuestionId: int|null, text: string, type: 'color'|'conditional'|'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}' is more general than the declared return type 'array{branchId: null|string, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}, formId: int, id: int, isRequired: bool, name: string, order: int, parentQuestionId: int|null, text: string, type: 'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}' for OCA\Forms\Db\Question::read (see https://psalm.dev/129)
MoreSpecificReturnType: lib/Db/Question.php#L86
lib/Db/Question.php:86:13: MoreSpecificReturnType: The declared return type 'array{branchId: null|string, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}, formId: int, id: int, isRequired: bool, name: string, order: int, parentQuestionId: int|null, text: string, type: 'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}' for OCA\Forms\Db\Question::read is more specific than the inferred return type 'array{branchId: null|string, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}, formId: int, id: int, isRequired: bool, name: string, order: int, parentQuestionId: int|null, text: string, type: 'color'|'conditional'|'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}' (see https://psalm.dev/070)
InvalidReturnStatement: lib/Controller/ApiController.php#L611
lib/Controller/ApiController.php:611:10: InvalidReturnStatement: The inferred type 'OCP\AppFramework\Http\DataResponse<201, array{accept: array<never, never>, branchId?: null|string, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}|stdClass, formId: int, id: int, isRequired: bool, name: string, options: list<array{id: int, order: int|null, questionId: float|int, text: string}>, order: int, parentQuestionId?: int|null, text: string, type: 'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}, array<never, never>>' does not match the declared return type 'OCP\AppFramework\Http\DataResponse<201, array{accept: list<string>, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}|stdClass, formId: int, id: int, isRequired: bool, name: string, options: list<array{id: int, order: int|null, questionId: float|int, text: string}>, order: int, text: string, type: 'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}, array<never, never>>' for OCA\Forms\Controller\ApiController::newQuestion (see https://psalm.dev/128)
InvalidReturnType: lib/Controller/ApiController.php#L452
lib/Controller/ApiController.php:452:13: InvalidReturnType: The declared return type 'OCP\AppFramework\Http\DataResponse<201, array{accept: list<string>, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}|stdClass, formId: int, id: int, isRequired: bool, name: string, options: list<array{id: int, order: int|null, questionId: float|int, text: string}>, order: int, text: string, type: 'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}, array<never, never>>' for OCA\Forms\Controller\ApiController::newQuestion is incorrect, got 'OCP\AppFramework\Http\DataResponse<201, array{accept: array<never, never>, branchId?: null|string, description: string, extraSettings: array{allowOtherAnswer?: bool, allowedFileExtensions?: list<string>, allowedFileTypes?: list<string>, dateMax?: int, dateMin?: int, dateRange?: bool, maxAllowedFilesCount?: int, maxFileSize?: int, optionsHighest?: 2|3|4|5|6|7|8|9|10, optionsLabelHighest?: string, optionsLabelLowest?: string, optionsLimitMax?: int, optionsLimitMin?: int, optionsLowest?: 0|1, shuffleOptions?: bool, timeMax?: int, timeMin?: int, timeRange?: bool, validationRegex?: string, validationType?: string}|stdClass, formId: int, id: int, isRequired: bool, name: string, options: list<array{id: int, order: int|null, questionId: float|int, text: string}>, order: int, parentQuestionId?: int|null, text: string, type: 'date'|'datetime'|'dropdown'|'file'|'long'|'multiple'|'multiple_unique'|'short'|'time'}, array<never, never>>' (see https://psalm.dev/011)
static-psalm-analysis-summary
Process completed with exit code 1.