| Conditions | 5 |
| Paths | 5 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 5 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 44 | 7 | protected function getContent(InputInterface $input) |
|
| 45 | { |
||
| 46 | 7 | switch($input->getArgument('test')) { |
|
| 47 | 7 | case 'json': |
|
| 48 | 2 | return($this->getTestContent( |
|
| 49 | 2 | 'tweets_32_bits.json')); |
|
| 50 | 5 | case 'json_with_retweet': |
|
| 51 | 1 | return($this->getTestContent( |
|
| 52 | 1 | 'tweet_with_retweet.json')); |
|
| 53 | 4 | case 'not_array': |
|
| 54 | // Return null instead of JSON |
||
| 55 | 1 | return(null); |
|
| 56 | 3 | case 'empty_array': |
|
| 57 | // Return an empty array instead of JSON |
||
| 58 | 2 | return(array()); |
|
| 59 | 1 | default: |
|
| 60 | // Normal behaviour |
||
| 61 | 1 | return(parent::getContent($input)); |
|
| 62 | 1 | } |
|
| 63 | } |
||
| 64 | } |
||
| 65 |