Skip to content

Commit

Permalink
Code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jensschuppe committed Apr 22, 2024
1 parent 5b629d2 commit cf8b3f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Civi/Api4/Service/Links/ECKLinksProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ public static function getSubscribedEvents(): array {

public static function alterECKLinksResult(RespondEvent $e): void {
$request = $e->getApiRequest();
if (is_object($request) && is_a($request, '\Civi\Api4\Action\GetLinks') && str_starts_with($request->getEntityName(), 'Eck_')) {
if (
is_object($request)
&& is_a($request, '\Civi\Api4\Action\GetLinks') && str_starts_with($request->getEntityName(), 'Eck_')
) {
$links = (array) $e->getResponse();
$addLinkIndex = self::getActionIndex($links, 'add');
// Expand the "add" link to multiple subtypes if it exists (otherwise the WHERE clause excluded "add" so we should too)
// Expand the "add" link to multiple subtypes if it exists (otherwise the WHERE clause excluded "add" so we should
// too).
if ($request->getExpandMultiple() && isset($addLinkIndex)) {
[, $entityTypeName] = explode('_', $request->getEntityName(), 2);
$addLinks = [];
Expand Down

0 comments on commit cf8b3f5

Please sign in to comment.