From b8ec603f33f5d6c720797cd5271452879007b092 Mon Sep 17 00:00:00 2001 From: Andreas Hennings Date: Sat, 19 Oct 2024 23:02:42 +0200 Subject: [PATCH] Issue #48: Rename some vars and simplify code. --- src/Summarizer/Summarizer.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Summarizer/Summarizer.php b/src/Summarizer/Summarizer.php index 59f6d43..d11a38b 100644 --- a/src/Summarizer/Summarizer.php +++ b/src/Summarizer/Summarizer.php @@ -20,7 +20,7 @@ final class Summarizer extends UtilBase { * * @param class-string $interface * Interface. - * @param \Ock\Adaptism\UniversalAdapter\UniversalAdapterInterface $universalAdapter + * @param \Ock\Adaptism\UniversalAdapter\UniversalAdapterInterface $adapter * The universal adapter. * * @return \Ock\Ock\Summarizer\SummarizerInterface @@ -31,16 +31,15 @@ final class Summarizer extends UtilBase { */ public static function fromIface( string $interface, - UniversalAdapterInterface $universalAdapter + UniversalAdapterInterface $adapter ): SummarizerInterface { - return self::fromFormula( - Formula::iface($interface), - $universalAdapter); + $formula = Formula::iface($interface); + return self::fromFormula($formula, $adapter); } /** * @param \Ock\Ock\Core\Formula\FormulaInterface $formula - * @param \Ock\Adaptism\UniversalAdapter\UniversalAdapterInterface $universalAdapter + * @param \Ock\Adaptism\UniversalAdapter\UniversalAdapterInterface $adapter * * @return \Ock\Ock\Summarizer\SummarizerInterface * @@ -49,12 +48,12 @@ public static function fromIface( */ public static function fromFormula( FormulaInterface $formula, - UniversalAdapterInterface $universalAdapter + UniversalAdapterInterface $adapter ): SummarizerInterface { return FormulaAdapter::requireObject( $formula, SummarizerInterface::class, - $universalAdapter, + $adapter, ); }