| Conditions | 3 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 4 | public function getFeedContent(array $options) |
|
| 31 | { |
||
| 32 | 4 | $feed = new Feed(); |
|
| 33 | |||
| 34 | 4 | $id = array_key_exists('id', $options) ? $options['id'] : null; |
|
| 35 | |||
| 36 | 4 | if ($id === 'not-found') { |
|
| 37 | 2 | throw new FeedNotFoundException(); |
|
| 38 | } |
||
| 39 | |||
| 40 | 2 | $feed->setPublicId($id); |
|
| 41 | |||
| 42 | 2 | $feed->setTitle('thank you for using RssAtomBundle'); |
|
| 43 | 2 | $feed->setDescription('this is the mock FeedContent'); |
|
| 44 | 2 | $feed->setLink('https://raw.github.com/alexdebril/rss-atom-bundle/'); |
|
| 45 | 2 | $feed->setLastModified(new \DateTime()); |
|
| 46 | |||
| 47 | 2 | return $this->addItem($feed); |
|
| 48 | } |
||
| 49 | |||
| 69 |