Skip to content

Commit

Permalink
Issue #48: Rename some vars and simplify code.
Browse files Browse the repository at this point in the history
  • Loading branch information
donquixote committed Oct 21, 2024
1 parent 661d3e1 commit b8ec603
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/Summarizer/Summarizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
*
Expand All @@ -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,
);
}

Expand Down

0 comments on commit b8ec603

Please sign in to comment.