@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use Aura\Sql\ConnectionLocator; |
| 6 | 6 | |
| 7 | -class MysqlCompanionRepository implements CompanionRepositoryInterface |
|
| 8 | -{ |
|
| 7 | +class MysqlCompanionRepository implements CompanionRepositoryInterface |
|
| 8 | +{
|
|
| 9 | 9 | |
| 10 | 10 | /** @var Aura\Sql\ConnectionLocator */ |
| 11 | 11 | protected $connections; |
@@ -13,13 +13,11 @@ discard block |
||
| 13 | 13 | /** |
| 14 | 14 | * @param Aura\Sql\ConnectionLocator $connections |
| 15 | 15 | */ |
| 16 | - public function __construct(ConnectionLocator $connections) |
|
| 17 | - { |
|
| 16 | + public function __construct(ConnectionLocator $connections) {
|
|
| 18 | 17 | $this->connections = $connections; |
| 19 | 18 | } |
| 20 | 19 | |
| 21 | - public function getCompanionList() |
|
| 22 | - { |
|
| 20 | + public function getCompanionList() {
|
|
| 23 | 21 | $query = " |
| 24 | 22 | SELECT `companion`.`name`, `companion`.`alias`, COUNT(1) AS `count` |
| 25 | 23 | FROM `jpemeric_waterfall`.`companion` |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Jacobemerick\Web\Domain\Waterfall\Companion; |
| 4 | 4 | |
| 5 | -interface CompanionRepositoryInterface |
|
| 6 | -{ |
|
| 5 | +interface CompanionRepositoryInterface |
|
| 6 | +{
|
|
| 7 | 7 | public function getCompanionList(); |
| 8 | 8 | } |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Jacobemerick\Web\Domain\Waterfall\Log; |
| 4 | 4 | |
| 5 | -interface LogRepositoryInterface |
|
| 6 | -{ |
|
| 5 | +interface LogRepositoryInterface |
|
| 6 | +{
|
|
| 7 | 7 | public function getActiveLogs($limit = null, $offset= 0); |
| 8 | 8 | } |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use Aura\Sql\ConnectionLocator; |
| 6 | 6 | |
| 7 | -class MysqlLogRepository implements LogRepositoryInterface |
|
| 8 | -{ |
|
| 7 | +class MysqlLogRepository implements LogRepositoryInterface |
|
| 8 | +{
|
|
| 9 | 9 | |
| 10 | 10 | /** @var Aura\Sql\ConnectionLocator */ |
| 11 | 11 | protected $connections; |
@@ -13,13 +13,11 @@ discard block |
||
| 13 | 13 | /** |
| 14 | 14 | * @param Aura\Sql\ConnectionLocator $connections |
| 15 | 15 | */ |
| 16 | - public function __construct(ConnectionLocator $connections) |
|
| 17 | - { |
|
| 16 | + public function __construct(ConnectionLocator $connections) {
|
|
| 18 | 17 | $this->connections = $connections; |
| 19 | 18 | } |
| 20 | 19 | |
| 21 | - public function getActiveLogs($limit = null, $offset = 0) |
|
| 22 | - { |
|
| 20 | + public function getActiveLogs($limit = null, $offset = 0) {
|
|
| 23 | 21 | $query = " |
| 24 | 22 | SELECT `id`, `title`, `alias`, `date`, `publish_date`, `introduction` |
| 25 | 23 | FROM `jpemeric_waterfall`.`log` |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use Aura\Sql\ConnectionLocator; |
| 6 | 6 | |
| 7 | -class MysqlPostRepository implements PostRepositoryInterface |
|
| 8 | -{ |
|
| 7 | +class MysqlPostRepository implements PostRepositoryInterface |
|
| 8 | +{
|
|
| 9 | 9 | |
| 10 | 10 | /** @var Aura\Sql\ConnectionLocator */ |
| 11 | 11 | protected $connections; |
@@ -13,8 +13,7 @@ discard block |
||
| 13 | 13 | /** |
| 14 | 14 | * @param Aura\Sql\ConnectionLocator $connections |
| 15 | 15 | */ |
| 16 | - public function __construct(ConnectionLocator $connections) |
|
| 17 | - { |
|
| 16 | + public function __construct(ConnectionLocator $connections) {
|
|
| 18 | 17 | $this->connections = $connections; |
| 19 | 18 | } |
| 20 | 19 | |
@@ -23,8 +22,7 @@ discard block |
||
| 23 | 22 | * |
| 24 | 23 | * @return array|false |
| 25 | 24 | */ |
| 26 | - public function findPostByPath($path) |
|
| 27 | - { |
|
| 25 | + public function findPostByPath($path) {
|
|
| 28 | 26 | $query = " |
| 29 | 27 | SELECT `id`, `title`, `path`, `date`, `body`, `category` |
| 30 | 28 | FROM `jpemeric_blog`.`post` |
@@ -41,8 +39,7 @@ discard block |
||
| 41 | 39 | ->fetchOne($query, $bindings); |
| 42 | 40 | } |
| 43 | 41 | |
| 44 | - public function getActivePosts($limit = null, $offset = 0) |
|
| 45 | - { |
|
| 42 | + public function getActivePosts($limit = null, $offset = 0) {
|
|
| 46 | 43 | $query = " |
| 47 | 44 | SELECT `id`, `title`, `path`, `date`, `body`, `category` |
| 48 | 45 | FROM `jpemeric_blog`.`post` |
@@ -63,8 +60,7 @@ discard block |
||
| 63 | 60 | ->fetchAll($query, $bindings); |
| 64 | 61 | } |
| 65 | 62 | |
| 66 | - public function getActivePostsCount() |
|
| 67 | - { |
|
| 63 | + public function getActivePostsCount() {
|
|
| 68 | 64 | $query = " |
| 69 | 65 | SELECT COUNT(1) AS `count` |
| 70 | 66 | FROM `jpemeric_blog`.`post` |
@@ -79,8 +75,7 @@ discard block |
||
| 79 | 75 | ->fetchValue($query, $bindings); |
| 80 | 76 | } |
| 81 | 77 | |
| 82 | - public function getActivePostsByTag($tag, $limit = null, $offset = 0) |
|
| 83 | - { |
|
| 78 | + public function getActivePostsByTag($tag, $limit = null, $offset = 0) {
|
|
| 84 | 79 | $query = " |
| 85 | 80 | SELECT `id`, `title`, `path`, `date`, `body`, `category` |
| 86 | 81 | FROM `jpemeric_blog`.`post` |
@@ -104,8 +99,7 @@ discard block |
||
| 104 | 99 | ->fetchAll($query, $bindings); |
| 105 | 100 | } |
| 106 | 101 | |
| 107 | - public function getActivePostsCountByTag($tag) |
|
| 108 | - { |
|
| 102 | + public function getActivePostsCountByTag($tag) {
|
|
| 109 | 103 | $query = " |
| 110 | 104 | SELECT COUNT(1) AS `count` |
| 111 | 105 | FROM `jpemeric_blog`.`post` |
@@ -123,8 +117,7 @@ discard block |
||
| 123 | 117 | ->fetchValue($query, $bindings); |
| 124 | 118 | } |
| 125 | 119 | |
| 126 | - public function getActivePostsByCategory($category, $limit = null, $offset = 0) |
|
| 127 | - { |
|
| 120 | + public function getActivePostsByCategory($category, $limit = null, $offset = 0) {
|
|
| 128 | 121 | $query = " |
| 129 | 122 | SELECT `id`, `title`, `path`, `date`, `body`, `category` |
| 130 | 123 | FROM `jpemeric_blog`.`post` |
@@ -146,8 +139,7 @@ discard block |
||
| 146 | 139 | ->fetchAll($query, $bindings); |
| 147 | 140 | } |
| 148 | 141 | |
| 149 | - public function getActivePostsCountByCategory($category) |
|
| 150 | - { |
|
| 142 | + public function getActivePostsCountByCategory($category) {
|
|
| 151 | 143 | $query = " |
| 152 | 144 | SELECT COUNT(1) AS `count` |
| 153 | 145 | FROM `jpemeric_blog`.`post` |
@@ -163,8 +155,7 @@ discard block |
||
| 163 | 155 | ->fetchValue($query, $bindings); |
| 164 | 156 | } |
| 165 | 157 | |
| 166 | - public function getActivePostsByRelatedTags($post, $limit = 4) |
|
| 167 | - { |
|
| 158 | + public function getActivePostsByRelatedTags($post, $limit = 4) {
|
|
| 168 | 159 | $query = " |
| 169 | 160 | SELECT `id`, `title`, `path`, `date`, `body`, `category`, COUNT(1) AS `count` |
| 170 | 161 | FROM `jpemeric_blog`.`post` |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Jacobemerick\Web\Domain\Blog\Post; |
| 4 | 4 | |
| 5 | -interface PostRepositoryInterface |
|
| 6 | -{ |
|
| 5 | +interface PostRepositoryInterface |
|
| 6 | +{
|
|
| 7 | 7 | public function findPostByPath($path); |
| 8 | 8 | public function getActivePosts($limit = null, $offset= 0); |
| 9 | 9 | public function getActivePostsCount(); |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use Aura\Sql\ConnectionLocator; |
| 6 | 6 | |
| 7 | -class MysqlSeriesRepository implements SeriesRepositoryInterface |
|
| 8 | -{ |
|
| 7 | +class MysqlSeriesRepository implements SeriesRepositoryInterface |
|
| 8 | +{
|
|
| 9 | 9 | |
| 10 | 10 | /** @var Aura\Sql\ConnectionLocator */ |
| 11 | 11 | protected $connections; |
@@ -13,8 +13,7 @@ discard block |
||
| 13 | 13 | /** |
| 14 | 14 | * @param Aura\Sql\ConnectionLocator |
| 15 | 15 | */ |
| 16 | - public function __construct(ConnectionLocator $connections) |
|
| 17 | - { |
|
| 16 | + public function __construct(ConnectionLocator $connections) {
|
|
| 18 | 17 | $this->connections = $connections; |
| 19 | 18 | } |
| 20 | 19 | |
@@ -23,8 +22,7 @@ discard block |
||
| 23 | 22 | * |
| 24 | 23 | * @return array|false |
| 25 | 24 | */ |
| 26 | - public function getSeriesForPost($post) |
|
| 27 | - { |
|
| 25 | + public function getSeriesForPost($post) {
|
|
| 28 | 26 | $query = " |
| 29 | 27 | SELECT `series`.`title` AS `series_title`, `series`.`description` AS `series_description`, |
| 30 | 28 | `post`.`id` AS `post`, `post`.`title`, `post`.`category`, `post`.`path` |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Jacobemerick\Web\Domain\Blog\Series; |
| 4 | 4 | |
| 5 | -interface SeriesRepositoryInterface |
|
| 6 | -{ |
|
| 5 | +interface SeriesRepositoryInterface |
|
| 6 | +{
|
|
| 7 | 7 | public function getSeriesForPost($post); |
| 8 | 8 | } |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use Aura\Sql\ConnectionLocator; |
| 6 | 6 | |
| 7 | -class MysqlTagRepository implements TagRepositoryInterface |
|
| 8 | -{ |
|
| 7 | +class MysqlTagRepository implements TagRepositoryInterface |
|
| 8 | +{
|
|
| 9 | 9 | |
| 10 | 10 | /** @var Aura\Sql\ConnectionLocator */ |
| 11 | 11 | protected $connections; |
@@ -13,8 +13,7 @@ discard block |
||
| 13 | 13 | /** |
| 14 | 14 | * @param Aura\Sql\ConnectionLocator |
| 15 | 15 | */ |
| 16 | - public function __construct(ConnectionLocator $connections) |
|
| 17 | - { |
|
| 16 | + public function __construct(ConnectionLocator $connections) {
|
|
| 18 | 17 | $this->connections = $connections; |
| 19 | 18 | } |
| 20 | 19 | |
@@ -23,8 +22,7 @@ discard block |
||
| 23 | 22 | * |
| 24 | 23 | * @return array|false |
| 25 | 24 | */ |
| 26 | - public function findTagByTitle($title) |
|
| 27 | - { |
|
| 25 | + public function findTagByTitle($title) {
|
|
| 28 | 26 | $query = " |
| 29 | 27 | SELECT * |
| 30 | 28 | FROM `jpemeric_blog`.`tag` |
@@ -40,8 +38,7 @@ discard block |
||
| 40 | 38 | ->fetchOne($query, $bindings); |
| 41 | 39 | } |
| 42 | 40 | |
| 43 | - public function getAllTags() |
|
| 44 | - { |
|
| 41 | + public function getAllTags() {
|
|
| 45 | 42 | $query = " |
| 46 | 43 | SELECT * |
| 47 | 44 | FROM `jpemeric_blog`.`tag` |
@@ -53,8 +50,7 @@ discard block |
||
| 53 | 50 | ->fetchAll($query); |
| 54 | 51 | } |
| 55 | 52 | |
| 56 | - public function getTagCloud() |
|
| 57 | - { |
|
| 53 | + public function getTagCloud() {
|
|
| 58 | 54 | $query = " |
| 59 | 55 | SELECT COUNT(1) AS `count`, `tag` |
| 60 | 56 | FROM `jpemeric_blog`.`tag` |
@@ -72,8 +68,7 @@ discard block |
||
| 72 | 68 | ->fetchAll($query, $bindings); |
| 73 | 69 | } |
| 74 | 70 | |
| 75 | - public function getTagsForPost($post) |
|
| 76 | - { |
|
| 71 | + public function getTagsForPost($post) {
|
|
| 77 | 72 | $query = " |
| 78 | 73 | SELECT `tag`.* |
| 79 | 74 | FROM `jpemeric_blog`.`tag` |