feat(polls): allow editing of draft polls #21577
Annotations
10 errors
Run coding standards check:
lib/Controller/PollController.php#L64
lib/Controller/PollController.php:64:13: MoreSpecificReturnType: The declared return type 'OCP\AppFramework\Http\DataResponse<200|201|400, array{actorDisplayName?: string, actorId?: non-empty-string, actorType?: 'bots'|'bridged'|'circles'|'emails'|'federated_users'|'groups'|'guests'|'phones'|'users', details?: list<array{actorDisplayName: string, actorId: string, actorType: string, optionId: int}>, error?: 'draft'|'options'|'question'|'room', id?: int<1, max>, maxVotes?: int<0, max>, numVoters?: int<0, max>, options?: list<string>, question?: non-empty-string, resultMode?: 0|1, status?: 0|1|2, votedSelf?: list<int>, votes?: array<string, int>}, array<never, never>>' for OCA\Talk\Controller\PollController::createPoll is more specific than the inferred return type 'OCP\AppFramework\Http\DataResponse<200|201|400, array{actorDisplayName?: string, actorId?: non-empty-string, actorType?: 'bots'|'bridged'|'circles'|'emails'|'federated_users'|'groups'|'guests'|'phones'|'users', details?: list<array{actorDisplayName: string, actorId: string, actorType: string, optionId: int}>, error?: 'draft'|'options'|'poll'|'question'|'room', id?: int<1, max>, maxVotes?: int<0, max>, numVoters?: int<0, max>, options?: list<string>, question?: non-empty-string, resultMode?: 0|1, status?: 0|1|2, votedSelf?: list<int>, votes?: array<string, int>}, array<never, never>>' (see https://psalm.dev/070)
|
Run coding standards check:
lib/Controller/PollController.php#L107
lib/Controller/PollController.php:107:11: InvalidReturnStatement: The inferred type 'OCP\AppFramework\Http\DataResponse<400, array{error: 'draft'|'options'|'poll'|'question'|'room'}, array<never, never>>' does not match the declared return type 'OCP\AppFramework\Http\DataResponse<200|201|400, array{actorDisplayName?: string, actorId?: non-empty-string, actorType?: 'bots'|'bridged'|'circles'|'emails'|'federated_users'|'groups'|'guests'|'phones'|'users', details?: list<array{actorDisplayName: string, actorId: string, actorType: string, optionId: int}>, error?: 'draft'|'options'|'question'|'room', id?: int<1, max>, maxVotes?: int<0, max>, numVoters?: int<0, max>, options?: list<string>, question?: non-empty-string, resultMode?: 0|1, status?: 0|1|2, votedSelf?: list<int>, votes?: array<string, int>}, array<never, never>>' for OCA\Talk\Controller\PollController::createPoll (see https://psalm.dev/128)
|
Run coding standards check:
lib/Controller/PollController.php#L148
lib/Controller/PollController.php:148:12: InvalidReturnType: The declared return type 'OCP\AppFramework\Http\DataResponse<200|400|404, array{actorDisplayName?: string, actorId?: non-empty-string, actorType?: 'bots'|'bridged'|'circles'|'emails'|'federated_users'|'groups'|'guests'|'phones'|'users', error?: string, id?: int<1, max>, maxVotes?: int<0, max>, options?: list<string>, question?: non-empty-string, resultMode?: 0|1, status?: 0|1|2}, array<never, never>>' for OCA\Talk\Controller\PollController::updateDraftPoll is incorrect, got 'OCP\AppFramework\Http\DataResponse<200|201|400|404, array{actorDisplayName?: string, actorId?: non-empty-string, actorType?: 'bots'|'bridged'|'circles'|'emails'|'federated_users'|'groups'|'guests'|'phones'|'users', details?: list<array{actorDisplayName: string, actorId: string, actorType: string, optionId: int}>, error?: mixed|string, id?: int<1, max>, maxVotes?: int<0, max>, numVoters?: int<0, max>, options?: list<string>, question?: non-empty-string, resultMode?: 0|1, status?: 0|1|2, votedSelf?: list<int>, votes?: array<string, int>}, array<never, never>>' (see https://psalm.dev/011)
|
Run coding standards check:
lib/Controller/PollController.php#L164
lib/Controller/PollController.php:164:11: InvalidReturnStatement: The inferred type 'OCP\AppFramework\Http\DataResponse<200|201|400, array{actorDisplayName?: string, actorId?: non-empty-string, actorType?: 'bots'|'bridged'|'circles'|'emails'|'federated_users'|'groups'|'guests'|'phones'|'users', details?: list<array{actorDisplayName: string, actorId: string, actorType: string, optionId: int}>, error?: 'draft'|'options'|'question'|'room', id?: int<1, max>, maxVotes?: int<0, max>, numVoters?: int<0, max>, options?: list<string>, question?: non-empty-string, resultMode?: 0|1, status?: 0|1|2, votedSelf?: list<int>, votes?: array<string, int>}, array<never, never>>' does not match the declared return type 'OCP\AppFramework\Http\DataResponse<200|400|404, array{actorDisplayName?: string, actorId?: non-empty-string, actorType?: 'bots'|'bridged'|'circles'|'emails'|'federated_users'|'groups'|'guests'|'phones'|'users', error?: string, id?: int<1, max>, maxVotes?: int<0, max>, options?: list<string>, question?: non-empty-string, resultMode?: 0|1, status?: 0|1|2}, array<never, never>>' for OCA\Talk\Controller\PollController::updateDraftPoll (see https://psalm.dev/128)
|
Run coding standards check:
lib/Controller/PollController.php#L164
lib/Controller/PollController.php:164:19: TooManyArguments: Too many arguments for method OCA\Talk\Federation\Proxy\TalkV1\Controller\PollController::updatedraftpoll - saw 8 (see https://psalm.dev/026)
|
Run coding standards check:
lib/Controller/PollController.php#L164
lib/Controller/PollController.php:164:122: UndefinedVariable: Cannot find referenced variable $draft (see https://psalm.dev/024)
|
Run coding standards check:
lib/Controller/PollController.php#L205
lib/Controller/PollController.php:205:44: UndefinedMethod: Method OCA\Talk\Exceptions\WrongPermissionsException::getReason does not exist (see https://psalm.dev/022)
|
Run coding standards check:
lib/Controller/PollController.php#L351
lib/Controller/PollController.php:351:13: InvalidReturnType: The declared return type 'OCP\AppFramework\Http\DataResponse<200|400|403|404, array{actorDisplayName?: string, actorId?: non-empty-string, actorType?: 'bots'|'bridged'|'circles'|'emails'|'federated_users'|'groups'|'guests'|'phones'|'users', details?: list<array{actorDisplayName: string, actorId: string, actorType: string, optionId: int}>, error?: string, id?: int<1, max>, maxVotes?: int<0, max>, numVoters?: int<0, max>, options?: list<string>, question?: non-empty-string, resultMode?: 0|1, status?: 0|1|2, votedSelf?: list<int>, votes?: array<string, int>}, array<never, never>>|OCP\AppFramework\Http\DataResponse<202, null, array<never, never>>' for OCA\Talk\Controller\PollController::closePoll is incorrect, got 'OCP\AppFramework\Http\DataResponse<200|400|403|404|500, array{actorDisplayName?: string, actorId?: non-empty-string, actorType?: 'bots'|'bridged'|'circles'|'emails'|'federated_users'|'groups'|'guests'|'phones'|'users', details?: list<array{actorDisplayName: string, actorId: string, actorType: string, optionId: int}>, error?: string, id?: int<1, max>, maxVotes?: int<0, max>, numVoters?: int<0, max>, options?: list<string>, question?: non-empty-string, resultMode?: 0|1, status?: 0|1|2, votedSelf?: list<int>, votes?: array<string, int>}, array<never, never>>|OCP\AppFramework\Http\DataResponse<202, null, array<never, never>>' (see https://psalm.dev/011)
|
Run coding standards check:
lib/Controller/PollController.php#L389
lib/Controller/PollController.php:389:12: UndefinedClass: Class, interface or enum named OCA\Talk\Controller\Exception does not exist (see https://psalm.dev/019)
|
Run coding standards check:
lib/Controller/PollController.php#L390
lib/Controller/PollController.php:390:25: UndefinedClass: Class, interface or enum named OCA\Talk\Controller\Exception does not exist (see https://psalm.dev/019)
|
Loading