Completed
Push — master ( 2b16eb...13f20e )
by Jacob
03:22
created
src/Domain/Waterfall/Log/LogRepositoryInterface.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 
5 5
 interface LogRepositoryInterface
6 6
 {
7
-    public function getActiveLogs($limit = null, $offset= 0);
7
+	public function getActiveLogs($limit = null, $offset= 0);
8 8
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 
5 5
 interface LogRepositoryInterface
6 6
 {
7
-    public function getActiveLogs($limit = null, $offset= 0);
7
+    public function getActiveLogs($limit = null, $offset = 0);
8 8
 }
Please login to merge, or discard this patch.
src/Domain/Waterfall/Log/MysqlLogRepository.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -7,36 +7,36 @@
 block discarded – undo
7 7
 class MysqlLogRepository implements LogRepositoryInterface
8 8
 {
9 9
 
10
-    /** @var  Aura\Sql\ConnectionLocator */
11
-    protected $connections;
12
-
13
-    /**
14
-     * @param Aura\Sql\ConnectionLocator $connections
15
-     */
16
-    public function __construct(ConnectionLocator $connections)
17
-    {
18
-        $this->connections = $connections;
19
-    }
20
-
21
-    public function getActiveLogs($limit = null, $offset = 0)
22
-    {
23
-        $query = "
10
+	/** @var  Aura\Sql\ConnectionLocator */
11
+	protected $connections;
12
+
13
+	/**
14
+	 * @param Aura\Sql\ConnectionLocator $connections
15
+	 */
16
+	public function __construct(ConnectionLocator $connections)
17
+	{
18
+		$this->connections = $connections;
19
+	}
20
+
21
+	public function getActiveLogs($limit = null, $offset = 0)
22
+	{
23
+		$query = "
24 24
             SELECT `id`, `title`, `alias`, `date`, `publish_date`, `introduction`
25 25
             FROM `jpemeric_waterfall`.`log`
26 26
             WHERE `is_public` = :public
27 27
             ORDER BY `date` DESC";
28
-        if ($limit != null) {
29
-            $query .= "
28
+		if ($limit != null) {
29
+			$query .= "
30 30
             LIMIT {$offset}, {$limit}";
31
-        }
31
+		}
32 32
 
33
-        $bindings = [
34
-            'public' => 1,
35
-        ];
33
+		$bindings = [
34
+			'public' => 1,
35
+		];
36 36
 
37
-        return $this
38
-            ->connections
39
-            ->getRead()
40
-            ->fetchAll($query, $bindings);
41
-    }
37
+		return $this
38
+			->connections
39
+			->getRead()
40
+			->fetchAll($query, $bindings);
41
+	}
42 42
 }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     protected $connections;
12 12
 
13 13
     /**
14
-     * @param Aura\Sql\ConnectionLocator $connections
14
+     * @param ConnectionLocator $connections
15 15
      */
16 16
     public function __construct(ConnectionLocator $connections)
17 17
     {
Please login to merge, or discard this patch.
src/Domain/Waterfall/Period/MysqlPeriodRepository.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -7,20 +7,20 @@  discard block
 block discarded – undo
7 7
 class MysqlPeriodRepository implements PeriodRepositoryInterface
8 8
 {
9 9
 
10
-    /** @var  Aura\Sql\ConnectionLocator */
11
-    protected $connections;
12
-
13
-    /**
14
-     * @param Aura\Sql\ConnectionLocator $connections
15
-     */
16
-    public function __construct(ConnectionLocator $connections)
17
-    {
18
-        $this->connections = $connections;
19
-    }
20
-
21
-    public function getPeriodList()
22
-    {
23
-        $query = "
10
+	/** @var  Aura\Sql\ConnectionLocator */
11
+	protected $connections;
12
+
13
+	/**
14
+	 * @param Aura\Sql\ConnectionLocator $connections
15
+	 */
16
+	public function __construct(ConnectionLocator $connections)
17
+	{
18
+		$this->connections = $connections;
19
+	}
20
+
21
+	public function getPeriodList()
22
+	{
23
+		$query = "
24 24
             SELECT `period`.`name`, `period`.`alias`, COUNT(1) AS `count`
25 25
             FROM `jpemeric_waterfall`.`period`
26 26
             INNER JOIN `jpemeric_waterfall`.`log` ON `log`.`period` = `log`.`id` AND
@@ -28,13 +28,13 @@  discard block
 block discarded – undo
28 28
             GROUP BY `alias`
29 29
             ORDER BY `name`";
30 30
 
31
-        $bindings = [
32
-            'public' => 1,
33
-        ];
31
+		$bindings = [
32
+			'public' => 1,
33
+		];
34 34
 
35
-        return $this
36
-            ->connections
37
-            ->getRead()
38
-            ->fetchAll($query, $bindings);
39
-    }
35
+		return $this
36
+			->connections
37
+			->getRead()
38
+			->fetchAll($query, $bindings);
39
+	}
40 40
 }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     protected $connections;
12 12
 
13 13
     /**
14
-     * @param Aura\Sql\ConnectionLocator $connections
14
+     * @param ConnectionLocator $connections
15 15
      */
16 16
     public function __construct(ConnectionLocator $connections)
17 17
     {
Please login to merge, or discard this patch.
src/Domain/Waterfall/Period/PeriodRepositoryInterface.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 
5 5
 interface PeriodRepositoryInterface
6 6
 {
7
-    public function getPeriodList();
7
+	public function getPeriodList();
8 8
 }
Please login to merge, or discard this patch.
src/Domain/Waterfall/Watercourse/MysqlWatercourseRepository.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -7,21 +7,21 @@  discard block
 block discarded – undo
7 7
 class MysqlWatercourseRepository implements WatercourseRepositoryInterface
8 8
 {
9 9
 
10
-    /** @var  Aura\Sql\ConnectionLocator */
11
-    protected $connections;
12
-
13
-    /**
14
-     * @param Aura\Sql\ConnectionLocator $connections
15
-     */
16
-    public function __construct(ConnectionLocator $connections)
17
-    {
18
-        $this->connections = $connections;
19
-    }
20
-
21
-    // todo wot are you even serious
22
-    public function getWatercourseList()
23
-    {
24
-        $query = "
10
+	/** @var  Aura\Sql\ConnectionLocator */
11
+	protected $connections;
12
+
13
+	/**
14
+	 * @param Aura\Sql\ConnectionLocator $connections
15
+	 */
16
+	public function __construct(ConnectionLocator $connections)
17
+	{
18
+		$this->connections = $connections;
19
+	}
20
+
21
+	// todo wot are you even serious
22
+	public function getWatercourseList()
23
+	{
24
+		$query = "
25 25
             SELECT `sum_table`.`name`, `sum_table`.`alias`, SUM(`count`) AS `count`
26 26
             FROM ((
27 27
                 SELECT `watercourse`.`name`, `watercourse`.`alias`, `parent_count`.`count`
@@ -46,15 +46,15 @@  discard block
 block discarded – undo
46 46
             GROUP BY `alias`
47 47
             ORDER BY `name`";
48 48
 
49
-        $bindings = [
50
-            'public' => 1,
51
-            'no_parent' => 0,
52
-            'has_page' => 1,
53
-        ];
54
-
55
-        return $this
56
-            ->connections
57
-            ->getRead()
58
-            ->fetchAll($query, $bindings);
59
-    }
49
+		$bindings = [
50
+			'public' => 1,
51
+			'no_parent' => 0,
52
+			'has_page' => 1,
53
+		];
54
+
55
+		return $this
56
+			->connections
57
+			->getRead()
58
+			->fetchAll($query, $bindings);
59
+	}
60 60
 }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     protected $connections;
12 12
 
13 13
     /**
14
-     * @param Aura\Sql\ConnectionLocator $connections
14
+     * @param ConnectionLocator $connections
15 15
      */
16 16
     public function __construct(ConnectionLocator $connections)
17 17
     {
Please login to merge, or discard this patch.
src/Domain/Waterfall/Watercourse/WatercourseRepositoryInterface.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 
5 5
 interface WatercourseRepositoryInterface
6 6
 {
7
-    public function getWatercourseList();
7
+	public function getWatercourseList();
8 8
 }
Please login to merge, or discard this patch.
src/Domain/Waterfall/Waterfall/WaterfallRepositoryInterface.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 
5 5
 interface WaterfallRepositoryInterface
6 6
 {
7
-    public function getWaterfalls($limit = null, $offset= 0);
7
+	public function getWaterfalls($limit = null, $offset= 0);
8 8
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 
5 5
 interface WaterfallRepositoryInterface
6 6
 {
7
-    public function getWaterfalls($limit = null, $offset= 0);
7
+    public function getWaterfalls($limit = null, $offset = 0);
8 8
 }
Please login to merge, or discard this patch.
src/Domain/Stream/Changelog/ChangelogRepositoryInterface.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 
5 5
 interface ChangelogRepositoryInterface
6 6
 {
7
-    public function getChanges($limit = null, $offset = 0);
7
+	public function getChanges($limit = null, $offset = 0);
8 8
 }
Please login to merge, or discard this patch.
src/Domain/Comment/Comment/MysqlCommentRepository.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     protected $connections;
12 12
 
13 13
     /**
14
-     * @param Aura\Sql\ConnectionLocator $connections
14
+     * @param ConnectionLocator $connections
15 15
      */
16 16
     public function __construct(ConnectionLocator $connections)
17 17
     {
Please login to merge, or discard this patch.
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -7,26 +7,26 @@  discard block
 block discarded – undo
7 7
 class MysqlCommentRepository implements CommentRepositoryInterface
8 8
 {
9 9
 
10
-    /** @var  Aura\Sql\ConnectionLocator */
11
-    protected $connections;
12
-
13
-    /**
14
-     * @param Aura\Sql\ConnectionLocator $connections
15
-     */
16
-    public function __construct(ConnectionLocator $connections)
17
-    {
18
-        $this->connections = $connections;
19
-    }
20
-
21
-    public function getActiveCommentsBySite($site, $limit = null, $offset = 0)
22
-    {
23
-        if ($site == 'blog') {
24
-            $site_id = 2;
25
-        } else {
26
-            throw new Exception('Unrecognized site id in comment repository');
27
-        }
28
-
29
-        $query = "
10
+	/** @var  Aura\Sql\ConnectionLocator */
11
+	protected $connections;
12
+
13
+	/**
14
+	 * @param Aura\Sql\ConnectionLocator $connections
15
+	 */
16
+	public function __construct(ConnectionLocator $connections)
17
+	{
18
+		$this->connections = $connections;
19
+	}
20
+
21
+	public function getActiveCommentsBySite($site, $limit = null, $offset = 0)
22
+	{
23
+		if ($site == 'blog') {
24
+			$site_id = 2;
25
+		} else {
26
+			throw new Exception('Unrecognized site id in comment repository');
27
+		}
28
+
29
+		$query = "
30 30
             SELECT `comment_meta`.`id`, `comment_meta`.`date`, `comment`.`body`, `commenter`.`name`,
31 31
                    `post`.`title`, `post`.`category`, `post`.`path`
32 32
             FROM `jpemeric_comment`.`comment_meta`
@@ -39,21 +39,21 @@  discard block
 block discarded – undo
39 39
                                                  `post`.`display` = :display_post
40 40
             WHERE `comment_meta`.`display` = :active_comment
41 41
             ORDER BY `comment_meta`.`date` DESC";
42
-        if ($limit != null) {
43
-            $query .= "
42
+		if ($limit != null) {
43
+			$query .= "
44 44
             LIMIT {$offset}, {$limit}";
45
-        }
46
-
47
-        $bindings = [
48
-            'trusted_commenter' => 1,
49
-            'comment_site' => $site_id,
50
-            'display_post' => 1,
51
-            'active_comment' => 1,
52
-        ];
53
-
54
-        return $this
55
-            ->connections
56
-            ->getRead()
57
-            ->fetchAll($query, $bindings);
58
-    }
45
+		}
46
+
47
+		$bindings = [
48
+			'trusted_commenter' => 1,
49
+			'comment_site' => $site_id,
50
+			'display_post' => 1,
51
+			'active_comment' => 1,
52
+		];
53
+
54
+		return $this
55
+			->connections
56
+			->getRead()
57
+			->fetchAll($query, $bindings);
58
+	}
59 59
 }
Please login to merge, or discard this patch.