Skip to content

Commit

Permalink
fix(rector): More reactor preparation
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Sep 18, 2024
1 parent 448479c commit 0371709
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Chat/AutoComplete/Sorter.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function getId(): string {
* executes the sort action
*
* @param array $sortArray the array to be sorted, provided as reference
* @param array $context carries key 'itemType' and 'itemId' of the source object (e.g. a file)
* @param array{itemType: string, itemId: string, search?: string} $context carries key 'itemType' and 'itemId' of the source object (e.g. a file)
* @since 13.0.0
*/
public function sort(array &$sortArray, array $context): void {

Check failure on line 38 in lib/Chat/AutoComplete/Sorter.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis

MoreSpecificImplementedParamType

lib/Chat/AutoComplete/Sorter.php:38:48: MoreSpecificImplementedParamType: Argument 2 of OCA\Talk\Chat\AutoComplete\Sorter::sort has the more specific type 'array{itemId: string, itemType: string, search?: string}', expecting 'array<array-key, mixed>' as defined by OCP\Collaboration\AutoComplete\ISorter::sort (see https://psalm.dev/140)
Expand Down
2 changes: 1 addition & 1 deletion lib/Collaboration/Collaborators/RoomPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(
* {@inheritdoc}
*/
public function search($search, $limit, $offset, ISearchResult $searchResult): bool {
if (empty($search)) {
if (!is_string($search) || $search === '') {
return false;
}

Expand Down

0 comments on commit 0371709

Please sign in to comment.