/** * Drops the country and its relations. * * @param LocationInterface $location The location to remove * @param OutputInterface $output A console output * * @return $this Self object */ private function dropCountry(LocationInterface $location, OutputInterface $output) { $countryCode = $location->getCode(); $this->startStopWatch('drop_location'); $this->locationDirector->remove($location); $stopWatchEvent = $this->stopStopWatch('drop_location'); $this->printMessage($output, 'Geo', 'Country ' . $countryCode . ' dropped in ' . $stopWatchEvent->getDuration() . ' milliseconds'); return $this; }
/** * Remove Vote action * * @param CommentInterface $comment Comment * @param string $authorToken Author token * * @return $this VoteManager */ public function removeVote(CommentInterface $comment, $authorToken) { /** * @var VoteInterface $vote */ $vote = $this->commentVoteObjectDirector->findOneBy(['authorToken' => $authorToken, 'comment' => $comment]); if ($vote instanceof VoteInterface) { $this->commentVoteObjectDirector->remove($vote); } return $this; }
/** * Test remove cart coupon * * @covers removeCartCoupon */ public function testRemoveCartCoupon() { $cartCoupon = $this->prophesize('Elcodi\\Component\\CartCoupon\\Entity\\Interfaces\\CartCouponInterface')->reveal(); $this->cartCouponDirector->remove($cartCoupon)->shouldBeCalled(); $this->createCartCouponManagerInstance()->removeCartCoupon($cartCoupon); }
/** * Removed a CartCoupon. * * @param CartCouponInterface $cartCoupon Cart coupon */ public function removeCartCoupon(CartCouponInterface $cartCoupon) { $this->cartCouponDirector->remove($cartCoupon); }