/**
  * @param Card $card
  * @return null|Checklist
  */
 protected function getIssueChecklistFromCard(Card $card)
 {
     $issueChecklist = null;
     foreach ($card->getIdChecklists() as $checklistId) {
         $checklist = $this->api->getChecklistById($checklistId);
         if ($checklist->getName() == Checklist::DEFAULT_NAME) {
             $issueChecklist = $checklist;
             break;
         }
     }
     return $issueChecklist;
 }
 /**
  * @param $shortLink
  * @return Card|null
  */
 public function getCardByShortLink($shortLink)
 {
     $card = new Card();
     $card->setShortLink($shortLink);
     $cardRequest = new CardRequest($card);
     /** @var Card $card */
     $card = $this->getResponse($cardRequest);
     //        if (! $card->getIdShort()) {
     //            return null;
     //        }1
     return $card;
 }
 /**
  * @return string
  */
 public function getRelativeUrl()
 {
     return 'cards/' . $this->card->getId() . '/actions/comments';
 }
 /**
  * @return string
  */
 public function getRelativeUrl()
 {
     return 'cards/' . $this->card->getId() . '/checklist/' . $this->checklist->getId() . '/checkItem/' . $this->object->getId() . '/state';
 }
 /**
  * @param Card $card
  * @return string
  */
 private function getTrelloBadge(Card $card)
 {
     return sprintf('<a target=_blank href="%s"><img src="http://img.shields.io/badge/trello-%s-blue.svg" /></a> ', $card->getUrl(), $card->getName());
 }