Skip to content

Commit

Permalink
Api4Interface: Make $options optional in countEntities()
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic Tubach committed Feb 26, 2024
1 parent 88f7135 commit 8ecf6ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Civi/RemoteTools/Api4/Api4.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct() {
self::$instance = $this;
}

public function countEntities(string $entityName, ConditionInterface $where, array $options): int {
public function countEntities(string $entityName, ConditionInterface $where, array $options = []): int {
return $this->execute($entityName, 'get', [
'checkPermissions' => $options['checkPermissions'] ?? FALSE,
'select' => ['row_count'],
Expand Down
2 changes: 1 addition & 1 deletion Civi/RemoteTools/Api4/Api4Interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ interface Api4Interface {
*
* @throws \CRM_Core_Exception
*/
public function countEntities(string $entityName, ConditionInterface $where, array $options): int;
public function countEntities(string $entityName, ConditionInterface $where, array $options = []): int;

/**
* @param array<string, mixed|ApiParameterInterface> $params
Expand Down

0 comments on commit 8ecf6ad

Please sign in to comment.