From 8e2cc7a2ff8f6734818bd8732f1c8bfe092a14bc Mon Sep 17 00:00:00 2001 From: Adam Kadlec Date: Sat, 17 Mar 2018 23:45:47 +0100 Subject: [PATCH] - Fixing service registration - Added missing return type --- src/IPub/Gravatar/DI/GravatarExtension.php | 3 ++- src/IPub/Gravatar/Latte/Macros.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/IPub/Gravatar/DI/GravatarExtension.php b/src/IPub/Gravatar/DI/GravatarExtension.php index d07c20d..92ea433 100644 --- a/src/IPub/Gravatar/DI/GravatarExtension.php +++ b/src/IPub/Gravatar/DI/GravatarExtension.php @@ -63,7 +63,8 @@ public function loadConfiguration() : void // Create cache services $builder->addDefinition($this->prefix('cache')) - ->setType(Caching\Cache::class, ['@cacheStorage', 'IPub.Gravatar']) + ->setType(Caching\Cache::class) + ->setArguments(['@cacheStorage', 'IPub.Gravatar']) ->setInject(FALSE); // Register template helpers diff --git a/src/IPub/Gravatar/Latte/Macros.php b/src/IPub/Gravatar/Latte/Macros.php index 03cb20b..6982b91 100644 --- a/src/IPub/Gravatar/Latte/Macros.php +++ b/src/IPub/Gravatar/Latte/Macros.php @@ -102,7 +102,7 @@ public function macroAttrGravatar(MacroNode $node, PhpWriter $writer) : string */ public static function prepareMacroArguments(string $macro) : array { - $arguments = array_map(function ($value) { + $arguments = array_map(function ($value) : string { return trim($value); }, explode(',', $macro));