コード例 #1
0
 /**
  * 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;
 }
コード例 #2
0
ファイル: VoteManager.php プロジェクト: xphere/elcodi
 /**
  * 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;
 }
コード例 #3
0
 /**
  * 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);
 }
コード例 #4
0
 /**
  * Removed a CartCoupon.
  *
  * @param CartCouponInterface $cartCoupon Cart coupon
  */
 public function removeCartCoupon(CartCouponInterface $cartCoupon)
 {
     $this->cartCouponDirector->remove($cartCoupon);
 }