@@ -8,31 +8,31 @@ |
||
| 8 | 8 | class MysqlGoodreadRepository implements GoodreadRepositoryInterface |
| 9 | 9 | { |
| 10 | 10 | |
| 11 | - /** @var ConnectionLocator */ |
|
| 12 | - protected $connections; |
|
| 13 | - |
|
| 14 | - /** |
|
| 15 | - * @param ConnectonLocator $connections |
|
| 16 | - */ |
|
| 17 | - public function __construct(ConnectionLocator $connections) |
|
| 18 | - { |
|
| 19 | - $this->connections = $connections; |
|
| 20 | - } |
|
| 21 | - |
|
| 22 | - public function getGoodreadsUpdatedSince(DateTime $datetime) |
|
| 23 | - { |
|
| 24 | - $query = " |
|
| 11 | + /** @var ConnectionLocator */ |
|
| 12 | + protected $connections; |
|
| 13 | + |
|
| 14 | + /** |
|
| 15 | + * @param ConnectonLocator $connections |
|
| 16 | + */ |
|
| 17 | + public function __construct(ConnectionLocator $connections) |
|
| 18 | + { |
|
| 19 | + $this->connections = $connections; |
|
| 20 | + } |
|
| 21 | + |
|
| 22 | + public function getGoodreadsUpdatedSince(DateTime $datetime) |
|
| 23 | + { |
|
| 24 | + $query = " |
|
| 25 | 25 | SELECT * |
| 26 | 26 | FROM `jpemeric_stream`.`goodread` |
| 27 | 27 | WHERE `updated_at` >= :last_update"; |
| 28 | 28 | |
| 29 | - $bindings = [ |
|
| 30 | - 'last_update' => $datetime->format('Y-m-d H:i:s'), |
|
| 31 | - ]; |
|
| 29 | + $bindings = [ |
|
| 30 | + 'last_update' => $datetime->format('Y-m-d H:i:s'), |
|
| 31 | + ]; |
|
| 32 | 32 | |
| 33 | - return $this |
|
| 34 | - ->connections |
|
| 35 | - ->getRead() |
|
| 36 | - ->fetchAll($query, $bindings); |
|
| 37 | - } |
|
| 33 | + return $this |
|
| 34 | + ->connections |
|
| 35 | + ->getRead() |
|
| 36 | + ->fetchAll($query, $bindings); |
|
| 37 | + } |
|
| 38 | 38 | } |