Skip to content

Commit

Permalink
Add array typehint on Twig Extensions (#208)
Browse files Browse the repository at this point in the history
Thanks for that !
  • Loading branch information
damienalexandre authored Jul 11, 2022
1 parent fc917cb commit f98c744
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Twig/AdminAuthorizationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ public function __construct($adminAuthorizationChecker)
$this->adminAuthorizationChecker = $adminAuthorizationChecker;
}

public function getFilters()
public function getFilters(): array
{
return [
new TwigFilter('prune_item_actions', [$this, 'pruneItemsActions']),
];
}

public function getFunctions()
public function getFunctions(): array
{
return [
new TwigFunction('is_easyadmin_granted', [$this, 'isEasyAdminGranted']),
Expand Down
2 changes: 1 addition & 1 deletion src/Twig/CheckboxTreeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class CheckboxTreeExtension extends AbstractExtension
{
public function getFunctions()
public function getFunctions(): array
{
return [
new TwigFunction(
Expand Down
4 changes: 2 additions & 2 deletions src/Twig/EmbeddedListExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ public function __construct($embeddedListHelper)
$this->embeddedListHelper = $embeddedListHelper;
}

public function getFilters()
public function getFilters(): array
{
return [
new TwigFilter('embedded_list_identifier', [$this, 'getEmbeddedListIdentifier']),
];
}

public function getFunctions()
public function getFunctions(): array
{
return [
new TwigFunction('guess_default_filters', [$this, 'guessDefaultFilters']),
Expand Down
2 changes: 1 addition & 1 deletion src/Twig/ListFormFiltersExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct($listFormFiltersHelper)
$this->listFormFiltersHelper = $listFormFiltersHelper;
}

public function getFunctions()
public function getFunctions(): array
{
return [
new TwigFunction('list_form_filters', [$this, 'getListFormFilters']),
Expand Down

0 comments on commit f98c744

Please sign in to comment.