private readonly CartFacadeHelper
$helper,
private readonly ScriptPriceStubs
$priceStubs ) { } public function factory(Hook
$hook, Script
$script): CartFacade
{ if (!
$hook instanceof CartAware
) { throw new HookInjectionException($hook, self::
class, CartAware::
class);
} return new CartFacade($this->helper,
$this->priceStubs,
$hook->
getCart(),
$hook->
getSalesChannelContext());
} /**
* @param CartFacade $service
*/
public function after(object
$service, Hook
$hook, Script
$script): void
{ $service->
calculate();
} public function getName(): string
{