From 002de2a4fb9e9baf156be0456d48911fbf5a8644 Mon Sep 17 00:00:00 2001 From: Project-Update-bot Date: Thu, 4 Apr 2024 13:01:51 +0000 Subject: [PATCH] Automated Project Update Bot fixes from run 11-137198. --- .../src/TwigExtension/Config.php | 6 +++--- .../src/TwigExtension/TwigArray.php | 2 +- .../src/TwigExtension/TwigDate.php | 2 +- .../src/TwigExtension/TwigText.php | 2 +- bamboo_twig_file/src/TwigExtension/File.php | 8 ++------ bamboo_twig_i18n/src/TwigExtension/I18n.php | 6 +++--- .../src/TwigExtension/Loader.php | 12 +++++------ .../src/TwigExtension/Render.php | 20 +++++++++---------- bamboo_twig_path/src/TwigExtension/Path.php | 2 +- .../src/TwigExtension/Security.php | 8 ++++---- bamboo_twig_token/src/TwigExtension/Token.php | 2 +- 11 files changed, 31 insertions(+), 39 deletions(-) diff --git a/bamboo_twig_config/src/TwigExtension/Config.php b/bamboo_twig_config/src/TwigExtension/Config.php index 064fcad..eb6b071 100644 --- a/bamboo_twig_config/src/TwigExtension/Config.php +++ b/bamboo_twig_config/src/TwigExtension/Config.php @@ -15,9 +15,9 @@ class Config extends TwigExtensionBase { */ public function getFunctions() { return [ - new TwigFunction('bamboo_settings_get', [$this, 'getSettings']), - new TwigFunction('bamboo_config_get', [$this, 'getConfig']), - new TwigFunction('bamboo_state_get', [$this, 'getState']), + new TwigFunction('bamboo_settings_get', $this->getSettings(...)), + new TwigFunction('bamboo_config_get', $this->getConfig(...)), + new TwigFunction('bamboo_state_get', $this->getState(...)), ]; } diff --git a/bamboo_twig_extensions/src/TwigExtension/TwigArray.php b/bamboo_twig_extensions/src/TwigExtension/TwigArray.php index df4ebad..bd5fa8e 100644 --- a/bamboo_twig_extensions/src/TwigExtension/TwigArray.php +++ b/bamboo_twig_extensions/src/TwigExtension/TwigArray.php @@ -15,7 +15,7 @@ class TwigArray extends AbstractExtension { */ public function getFilters() { return [ - new TwigFilter('bamboo_extensions_shuffle', [$this, 'shuffle']), + new TwigFilter('bamboo_extensions_shuffle', $this->shuffle(...)), ]; } diff --git a/bamboo_twig_extensions/src/TwigExtension/TwigDate.php b/bamboo_twig_extensions/src/TwigExtension/TwigDate.php index e6775c0..d839148 100644 --- a/bamboo_twig_extensions/src/TwigExtension/TwigDate.php +++ b/bamboo_twig_extensions/src/TwigExtension/TwigDate.php @@ -33,7 +33,7 @@ class TwigDate extends AbstractExtension { */ public function getFilters() { return [ - new TwigFilter('bamboo_extensions_time_diff', [$this, 'diff'], ['needs_environment' => TRUE]), + new TwigFilter('bamboo_extensions_time_diff', $this->diff(...), ['needs_environment' => TRUE]), ]; } diff --git a/bamboo_twig_extensions/src/TwigExtension/TwigText.php b/bamboo_twig_extensions/src/TwigExtension/TwigText.php index 837823d..84124d2 100644 --- a/bamboo_twig_extensions/src/TwigExtension/TwigText.php +++ b/bamboo_twig_extensions/src/TwigExtension/TwigText.php @@ -16,7 +16,7 @@ class TwigText extends AbstractExtension { */ public function getFilters() { return [ - new TwigFilter('bamboo_extensions_truncate', [$this, 'truncate'], ['needs_environment' => TRUE]), + new TwigFilter('bamboo_extensions_truncate', $this->truncate(...), ['needs_environment' => TRUE]), ]; } diff --git a/bamboo_twig_file/src/TwigExtension/File.php b/bamboo_twig_file/src/TwigExtension/File.php index fff6123..7ac53e0 100644 --- a/bamboo_twig_file/src/TwigExtension/File.php +++ b/bamboo_twig_file/src/TwigExtension/File.php @@ -16,9 +16,7 @@ class File extends TwigExtensionBase { */ public function getFilters() { return [ - new TwigFilter('bamboo_file_extension_guesser', [ - $this, 'extensionGuesser', - ]), + new TwigFilter('bamboo_file_extension_guesser', $this->extensionGuesser(...)), ]; } @@ -27,9 +25,7 @@ public function getFilters() { */ public function getFunctions() { return [ - new TwigFunction('bamboo_file_url_absolute', [ - $this, 'urlAbsolute', - ]), + new TwigFunction('bamboo_file_url_absolute', $this->urlAbsolute(...)), ]; } diff --git a/bamboo_twig_i18n/src/TwigExtension/I18n.php b/bamboo_twig_i18n/src/TwigExtension/I18n.php index 94b1279..7499d81 100644 --- a/bamboo_twig_i18n/src/TwigExtension/I18n.php +++ b/bamboo_twig_i18n/src/TwigExtension/I18n.php @@ -19,8 +19,8 @@ class I18n extends TwigExtensionBase { */ public function getFilters() { return [ - new TwigFilter('bamboo_i18n_format_date', [$this, 'formatDate'], ['needs_environment' => TRUE]), - new TwigFilter('bamboo_i18n_get_translation', [$this, 'getTranslation']), + new TwigFilter('bamboo_i18n_format_date', $this->formatDate(...), ['needs_environment' => TRUE]), + new TwigFilter('bamboo_i18n_get_translation', $this->getTranslation(...)), ]; } @@ -29,7 +29,7 @@ public function getFilters() { */ public function getFunctions() { return [ - new TwigFunction('bamboo_i18n_current_lang', [$this, 'getCurrentLanguage']), + new TwigFunction('bamboo_i18n_current_lang', $this->getCurrentLanguage(...)), ]; } diff --git a/bamboo_twig_loader/src/TwigExtension/Loader.php b/bamboo_twig_loader/src/TwigExtension/Loader.php index f6f961d..b0f195a 100644 --- a/bamboo_twig_loader/src/TwigExtension/Loader.php +++ b/bamboo_twig_loader/src/TwigExtension/Loader.php @@ -17,13 +17,11 @@ class Loader extends TwigExtensionBase { */ public function getFunctions() { return [ - new TwigFunction('bamboo_load_entity', [$this, 'loadEntity']), - new TwigFunction('bamboo_load_entity_revision', [ - $this, 'loadEntityRevision', - ]), - new TwigFunction('bamboo_load_field', [$this, 'loadField']), - new TwigFunction('bamboo_load_currentuser', [$this, 'loadCurrentUser']), - new TwigFunction('bamboo_load_image', [$this, 'loadImage']), + new TwigFunction('bamboo_load_entity', $this->loadEntity(...)), + new TwigFunction('bamboo_load_entity_revision', $this->loadEntityRevision(...)), + new TwigFunction('bamboo_load_field', $this->loadField(...)), + new TwigFunction('bamboo_load_currentuser', $this->loadCurrentUser(...)), + new TwigFunction('bamboo_load_image', $this->loadImage(...)), ]; } diff --git a/bamboo_twig_loader/src/TwigExtension/Render.php b/bamboo_twig_loader/src/TwigExtension/Render.php index 1178b87..797fbc6 100644 --- a/bamboo_twig_loader/src/TwigExtension/Render.php +++ b/bamboo_twig_loader/src/TwigExtension/Render.php @@ -20,17 +20,15 @@ class Render extends TwigExtensionBase { */ public function getFunctions() { return [ - new TwigFunction('bamboo_render_block', [$this, 'renderBlock'], ['is_safe' => ['html']]), - new TwigFunction('bamboo_render_form', [$this, 'renderForm'], ['is_safe' => ['html']]), - new TwigFunction('bamboo_render_entity', [$this, 'renderEntity'], ['is_safe' => ['html']]), - new TwigFunction('bamboo_render_entity_revision', [ - $this, 'renderEntityRevision', - ], ['is_safe' => ['html']]), - new TwigFunction('bamboo_render_region', [$this, 'renderRegion'], ['is_safe' => ['html']]), - new TwigFunction('bamboo_render_field', [$this, 'renderField'], ['is_safe' => ['html']]), - new TwigFunction('bamboo_render_image', [$this, 'renderImage'], ['is_safe' => ['html']]), - new TwigFunction('bamboo_render_image_style', [$this, 'renderImageStyle'], ['is_safe' => ['html']]), - new TwigFunction('bamboo_render_menu', [$this, 'renderMenu'], ['is_safe' => ['html']]), + new TwigFunction('bamboo_render_block', $this->renderBlock(...), ['is_safe' => ['html']]), + new TwigFunction('bamboo_render_form', $this->renderForm(...), ['is_safe' => ['html']]), + new TwigFunction('bamboo_render_entity', $this->renderEntity(...), ['is_safe' => ['html']]), + new TwigFunction('bamboo_render_entity_revision', $this->renderEntityRevision(...), ['is_safe' => ['html']]), + new TwigFunction('bamboo_render_region', $this->renderRegion(...), ['is_safe' => ['html']]), + new TwigFunction('bamboo_render_field', $this->renderField(...), ['is_safe' => ['html']]), + new TwigFunction('bamboo_render_image', $this->renderImage(...), ['is_safe' => ['html']]), + new TwigFunction('bamboo_render_image_style', $this->renderImageStyle(...), ['is_safe' => ['html']]), + new TwigFunction('bamboo_render_menu', $this->renderMenu(...), ['is_safe' => ['html']]), new TwigFunction('bamboo_render_views', 'views_embed_view'), ]; } diff --git a/bamboo_twig_path/src/TwigExtension/Path.php b/bamboo_twig_path/src/TwigExtension/Path.php index 87b7807..c35966a 100644 --- a/bamboo_twig_path/src/TwigExtension/Path.php +++ b/bamboo_twig_path/src/TwigExtension/Path.php @@ -15,7 +15,7 @@ class Path extends TwigExtensionBase { */ public function getFunctions() { return [ - new TwigFunction('bamboo_path_system', [$this, 'getSystemPath']), + new TwigFunction('bamboo_path_system', $this->getSystemPath(...)), ]; } diff --git a/bamboo_twig_security/src/TwigExtension/Security.php b/bamboo_twig_security/src/TwigExtension/Security.php index 32fa2e7..2319cff 100644 --- a/bamboo_twig_security/src/TwigExtension/Security.php +++ b/bamboo_twig_security/src/TwigExtension/Security.php @@ -15,10 +15,10 @@ class Security extends TwigExtensionBase { */ public function getFunctions() { return [ - new TwigFunction('bamboo_has_permission', [$this, 'hasPermission']), - new TwigFunction('bamboo_has_permissions', [$this, 'hasPermissions']), - new TwigFunction('bamboo_has_role', [$this, 'hasRole']), - new TwigFunction('bamboo_has_roles', [$this, 'hasRoles']), + new TwigFunction('bamboo_has_permission', $this->hasPermission(...)), + new TwigFunction('bamboo_has_permissions', $this->hasPermissions(...)), + new TwigFunction('bamboo_has_role', $this->hasRole(...)), + new TwigFunction('bamboo_has_roles', $this->hasRoles(...)), ]; } diff --git a/bamboo_twig_token/src/TwigExtension/Token.php b/bamboo_twig_token/src/TwigExtension/Token.php index d7658ab..d3b94fa 100644 --- a/bamboo_twig_token/src/TwigExtension/Token.php +++ b/bamboo_twig_token/src/TwigExtension/Token.php @@ -15,7 +15,7 @@ class Token extends TwigExtensionBase { */ public function getFunctions() { return [ - new TwigFunction('bamboo_token', [$this, 'substituteToken']), + new TwigFunction('bamboo_token', $this->substituteToken(...)), ]; }