Skip to content

Commit

Permalink
#213: style
Browse files Browse the repository at this point in the history
  • Loading branch information
glpzzz committed Sep 10, 2024
1 parent 00cd8ed commit fcd8ea4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ListView.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ protected function renderItem(ListItemContext $context): string
}

if ($this->itemView instanceof Closure) {
$content = (string)call_user_func($this->itemView, $context);
$content = (string)($this->itemView)($context);
}

$itemViewAttributes = is_callable($this->itemViewAttributes)
? (array)call_user_func($this->itemViewAttributes, $context)
? (array)($this->itemViewAttributes)($context)
: $this->itemViewAttributes;

foreach ($itemViewAttributes as $i => $attribute) {
Expand Down Expand Up @@ -320,7 +320,7 @@ private function renderAfterItem(ListItemContext $context): string
$result = '';

if (!empty($this->afterItem)) {
$result = (string)call_user_func($this->afterItem, $context);
$result = (string)($this->afterItem)($context);
}

return $result;
Expand All @@ -342,7 +342,7 @@ private function renderBeforeItem(ListItemContext $context): string
$result = '';

if (!empty($this->beforeItem)) {
$result = (string)call_user_func($this->beforeItem, $context);
$result = (string)($this->beforeItem)($context);
}

return $result;
Expand Down

0 comments on commit fcd8ea4

Please sign in to comment.