| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 40 | public function getChanges(string $version): WhatsNewResult |
||
| 41 | { |
||
| 42 | /* @var $qb IQueryBuilder */ |
||
| 43 | $qb = $this->db->getQueryBuilder(); |
||
| 44 | $result = $qb->select('*') |
||
| 45 | ->from(self::TABLE_NAME) |
||
| 46 | ->where($qb->expr()->eq('version', $qb->createNamedParameter($version))) |
||
| 47 | ->execute(); |
||
| 48 | |||
| 49 | $data = $result->fetch(); |
||
| 50 | $result->closeCursor(); |
||
| 51 | if ($data === false) { |
||
| 52 | throw new DoesNotExistException('Changes info is not present'); |
||
| 53 | } |
||
| 54 | return WhatsNewResult::fromRow($data); |
||
| 55 | } |
||
| 56 | } |