The hook must return a boolean value. If false is returned, the checkout process is aborted.
Example
// src/EventListener/Isotope/PreCheckoutListener.php
namespaceApp\EventListener\Isotope;useIsotope\Model\ProductCollection\Order;useIsotope\Module\Checkout;useIsotope\ServiceAnnotation\IsotopeHook;/**
* @IsotopeHook("preCheckout")
*/classPreCheckoutListener{publicfunction__invoke(?Order$order,Checkout$module):bool{if(!$order){returntrue;}if(count($order->getItems())>5){// only allow max 5 articles per order
returnfalse;}returntrue;}}