@@ -7,37 +7,37 @@ |
||
| 7 | 7 | class MysqlChangelogRepository implements ChangelogRepositoryInterface |
| 8 | 8 | { |
| 9 | 9 | |
| 10 | - /** @var ConnectionLocator */ |
|
| 11 | - protected $connections; |
|
| 10 | + /** @var ConnectionLocator */ |
|
| 11 | + protected $connections; |
|
| 12 | 12 | |
| 13 | - /** |
|
| 14 | - * @param ConnectonLocator $connections |
|
| 15 | - */ |
|
| 16 | - public function __construct(ConnectionLocator $connections) |
|
| 17 | - { |
|
| 18 | - $this->connections = $connections; |
|
| 19 | - } |
|
| 13 | + /** |
|
| 14 | + * @param ConnectonLocator $connections |
|
| 15 | + */ |
|
| 16 | + public function __construct(ConnectionLocator $connections) |
|
| 17 | + { |
|
| 18 | + $this->connections = $connections; |
|
| 19 | + } |
|
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * @param integer $limit |
|
| 23 | - * @param integer $offset |
|
| 24 | - * |
|
| 25 | - * @return array|false |
|
| 26 | - */ |
|
| 27 | - public function getChanges($limit = null, $offset = 0) |
|
| 28 | - { |
|
| 29 | - $query = " |
|
| 21 | + /** |
|
| 22 | + * @param integer $limit |
|
| 23 | + * @param integer $offset |
|
| 24 | + * |
|
| 25 | + * @return array|false |
|
| 26 | + */ |
|
| 27 | + public function getChanges($limit = null, $offset = 0) |
|
| 28 | + { |
|
| 29 | + $query = " |
|
| 30 | 30 | SELECT `message`, `message_short`, `datetime`, `commit_link` |
| 31 | 31 | FROM `jpemeric_stream`.`changelog` |
| 32 | 32 | ORDER BY `datetime` DESC"; |
| 33 | - if (!is_null($limit)) { |
|
| 34 | - $query .= " |
|
| 33 | + if (!is_null($limit)) { |
|
| 34 | + $query .= " |
|
| 35 | 35 | LIMIT {$offset}, {$limit}"; |
| 36 | - } |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - return $this |
|
| 39 | - ->connections |
|
| 40 | - ->getRead() |
|
| 41 | - ->fetchAll($query); |
|
| 42 | - } |
|
| 38 | + return $this |
|
| 39 | + ->connections |
|
| 40 | + ->getRead() |
|
| 41 | + ->fetchAll($query); |
|
| 42 | + } |
|
| 43 | 43 | } |