| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 27 | { |
||
| 28 | /** @var int|null $tweet_id */ |
||
| 29 | $tweet_id = $input->getArgument('tweet_id'); |
||
| 30 | |||
| 31 | $connection = new TwitterOAuth( |
||
| 32 | $this->container->getParameter('twitter_consumer_key'), |
||
| 33 | $this->container->getParameter('twitter_consumer_secret'), |
||
| 34 | $this->container->getParameter('twitter_token'), |
||
| 35 | $this->container->getParameter('twitter_token_secret') |
||
| 36 | ); |
||
| 37 | |||
| 38 | /** @var string $json */ |
||
| 39 | $json = json_encode($connection->get(sprintf( |
||
| 40 | 'statuses/show/%d', |
||
| 41 | $tweet_id |
||
| 42 | ))); |
||
| 43 | |||
| 44 | $output->writeln($json); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |