Skip to content

Commit

Permalink
utils
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudgrayau committed May 22, 2023
1 parent f68d1bd commit bd79cc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/twigextensions/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ class Extension extends AbstractExtension {
// Public Methods
// =========================================================================

public function getName() {
public function getName(): string {
return 'Twig Extensions';
}

public function getFunctions() {
public function getFunctions(): array {
return [
new TwigFunction('cgGetValue', [$this, 'getValue']),
];
}

public function getValue($array, $key, $default = null) {
public function getValue($array, $key, $default = null): mixed {
if (is_array($array)) {
return ArrayHelper::getValue($array, $key, $default);
}
Expand Down

0 comments on commit bd79cc1

Please sign in to comment.