From c21449ce6e9a65e80b03898b2676ba69d436397c Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Wed, 12 Jun 2024 07:12:54 +0000 Subject: [PATCH] Apply fixes from StyleCI --- extend.php | 1 + src/Extend/PrettyMail.php | 24 +++++++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/extend.php b/extend.php index 092e407..e8d6c6f 100644 --- a/extend.php +++ b/extend.php @@ -30,6 +30,7 @@ if ($serializer->getActor()->isAdmin()) { $attributes['fof-pretty-mail.extra-template-attrs'] = array_keys(resolve('fof-pretty-mail.additional-data')); } + return $attributes; }), ]; diff --git a/src/Extend/PrettyMail.php b/src/Extend/PrettyMail.php index 7656312..4f69954 100644 --- a/src/Extend/PrettyMail.php +++ b/src/Extend/PrettyMail.php @@ -1,5 +1,15 @@ data[$key] = $callback; - + return $this; } - + public function extend(Container $container, Extension $extension = null) { - $container->extend('fof-pretty-mail.additional-data', function($items) { + $container->extend('fof-pretty-mail.additional-data', function ($items) { return array_merge($items, $this->data); }); }