src/Entity/TweetRepository.php
protected function removeTweet($tweet)
    {
        $count = 0;

        foreach ($tweet->getMedias() as $media) {
            $tweet->removeMedia($media);
            $this->removeOrphanMedias($media);
        }

        // Don't count tweets that were only retweeted
        if ($tweet->isInTimeline()) {
            $count = 1;
        }

        $this->_em->remove($tweet);

        return $count;
    }
protected function removeTweet($tweet)
    {
        $count = 0;

        foreach ($tweet->getMedias() as $media) {
            $tweet->removeMedia($media);
            $this->removeOrphanMedias($media);
        }

        // Don't count tweets that were only retweeted
        if ($tweet->isInTimeline()) {
            $count = 1;
        }

        $this->_em->remove($tweet);

        return $count;
    }
protected function removeTweet ( $ tweet ) { $ count = 0 ; foreach ( $ tweet -> getMedias ( ) as $ media ) { $ tweet -> removeMedia ( $ media ) ; $ this -> removeOrphanMedias ( $ media ) ; } // Don't count tweets that were only retweeted if ( $ tweet -> isInTimeline ( ) ) { $ count = 1 ; } $ this -> _em -> remove ( $ tweet ) ; return $ count ; }
Remove the tweet and return 1 is the deleted tweet is not a
retweet.

@param Tweet $tweet

@return int
Remove the tweet and return 1 is the deleted tweet is not a retweet .