Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions CRM/Banking/Matcher/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,19 +260,14 @@
/** @var array<int, float>|null $filtered_list */
$filtered_list = $this->getCachedEntry($cache_key);
if ($filtered_list === NULL) {
$filtered_list = [];
/** @var array{values: list<array{id: string}>} $result */
$result = civicrm_api3('Contact', 'get', [
'id' => ['IN' => array_keys($contact2probability)],
'is_deleted' => 0,
'return' => 'id',
'sequential' => 1,
'options' => ['limit' => 0],
]);
foreach ($result['values'] as $contact) {
$contactId = (int) $contact['id'];
$filtered_list[$contactId] = $contact2probability[$contactId];
}
$notDeleted = \Civi\Api4\Contact::get(FALSE)
->addSelect('id')

Check failure on line 264 in CRM/Banking/Matcher/Context.php

View workflow job for this annotation

GitHub Actions / PHP_CodeSniffer

Object operator not indented correctly; expected 8 spaces but found 1

Check failure on line 264 in CRM/Banking/Matcher/Context.php

View workflow job for this annotation

GitHub Actions / PHP_CodeSniffer

Line indented incorrectly; expected 8 spaces, found 1

Check failure on line 264 in CRM/Banking/Matcher/Context.php

View workflow job for this annotation

GitHub Actions / PHP_CodeSniffer

Spaces must be used to indent lines; tabs are not allowed
->addWhere('id', 'IN', array_keys($contact2probability))

Check failure on line 265 in CRM/Banking/Matcher/Context.php

View workflow job for this annotation

GitHub Actions / PHP_CodeSniffer

Object operator not indented correctly; expected 1 spaces but found 8
->addWhere('is_deleted', '=', FALSE)
->execute()
->column('id');

$filtered_list = array_filter($contact2probability, fn ($id) => in_array($id, $notDeleted), ARRAY_FILTER_USE_KEY);

Check failure on line 270 in CRM/Banking/Matcher/Context.php

View workflow job for this annotation

GitHub Actions / PHPStan with PHP 8.1 prefer-stable

Call to function in_array() requires parameter #3 to be set.

Check failure on line 270 in CRM/Banking/Matcher/Context.php

View workflow job for this annotation

GitHub Actions / PHPStan with PHP 8.4 prefer-stable

Call to function in_array() requires parameter #3 to be set.

Check failure on line 270 in CRM/Banking/Matcher/Context.php

View workflow job for this annotation

GitHub Actions / PHPStan with PHP 8.1 prefer-lowest

Call to function in_array() requires parameter #3 to be set.

Check failure on line 270 in CRM/Banking/Matcher/Context.php

View workflow job for this annotation

GitHub Actions / PHPStan with PHP 8.4 prefer-lowest

Call to function in_array() requires parameter #3 to be set.
$this->setCachedEntry($cache_key, $filtered_list);
}
return $filtered_list;
Expand Down
Loading