private function getAddCartForm(Request $request)
    {
        /** @var CartAdd $cartAdd */
        if ($request->isMethod("post")) {
            $cartAdd = $this->createForm(FrontForm::CART_ADD);
        } else {
            $cartAdd = $this->createForm(
                FrontForm::CART_ADD,
                "form",
                array(),
                array(
                    'csrf_protection'   => false,
                )
            );
        }

        return $cartAdd;
    }
private function getAddCartForm(Request $request)
    {
        /** @var CartAdd $cartAdd */
        if ($request->isMethod("post")) {
            $cartAdd = $this->createForm(FrontForm::CART_ADD);
        } else {
            $cartAdd = $this->createForm(
                FrontForm::CART_ADD,
                "form",
                array(),
                array(
                    'csrf_protection'   => false,
                )
            );
        }

        return $cartAdd;
    }
private function getAddCartForm ( Request $ request ) { /** @var CartAdd $cartAdd */ if ( $ request -> isMethod ( "post" ) ) { $ cartAdd = $ this -> createForm ( FrontForm :: CART_ADD ) ; } else { $ cartAdd = $ this -> createForm ( FrontForm :: CART_ADD , "form" , array ( ) , array ( 'csrf_protection' => false , ) ) ; } return $ cartAdd ; }
Find the good way to construct the cart form

@param  Request $request
@return CartAdd
Find the good way to construct the cart form