@@ -5,54 +5,54 @@ |
||
5 | 5 | class LifestreamRouter extends Router |
6 | 6 | { |
7 | 7 | |
8 | - protected function get_redirect_array() |
|
9 | - { |
|
10 | - return array( |
|
11 | - (object) array( |
|
12 | - 'pattern' => '@/index.(html|htm|php)$@', |
|
13 | - 'replace' => '/'), |
|
14 | - (object) array( |
|
15 | - 'pattern' => '@^/1/$@', |
|
16 | - 'replace' => '/'), |
|
17 | - (object) array( |
|
18 | - 'pattern' => '@/page_([0-9]+)(/?)$@', |
|
19 | - 'replace' => '/page/$1/'), |
|
20 | - (object) array( |
|
21 | - 'pattern' => '@/tag/([a-z]+)/$@', |
|
22 | - 'replace' => '/$1/'), |
|
23 | - (object) array( |
|
24 | - 'pattern' => '@/tag/([a-z]+)/page/([0-9]+)/$@', |
|
25 | - 'replace' => '/$1/page/$2/'), |
|
26 | - (object) array( |
|
27 | - 'pattern' => '@/tag/([a-z-]+)/$@', |
|
28 | - 'replace' => '/'), |
|
29 | - (object) array( |
|
30 | - 'pattern' => '@/tag/([a-z-]+)/page/([0-9]+)/$@', |
|
31 | - 'replace' => '/')); |
|
32 | - } |
|
8 | + protected function get_redirect_array() |
|
9 | + { |
|
10 | + return array( |
|
11 | + (object) array( |
|
12 | + 'pattern' => '@/index.(html|htm|php)$@', |
|
13 | + 'replace' => '/'), |
|
14 | + (object) array( |
|
15 | + 'pattern' => '@^/1/$@', |
|
16 | + 'replace' => '/'), |
|
17 | + (object) array( |
|
18 | + 'pattern' => '@/page_([0-9]+)(/?)$@', |
|
19 | + 'replace' => '/page/$1/'), |
|
20 | + (object) array( |
|
21 | + 'pattern' => '@/tag/([a-z]+)/$@', |
|
22 | + 'replace' => '/$1/'), |
|
23 | + (object) array( |
|
24 | + 'pattern' => '@/tag/([a-z]+)/page/([0-9]+)/$@', |
|
25 | + 'replace' => '/$1/page/$2/'), |
|
26 | + (object) array( |
|
27 | + 'pattern' => '@/tag/([a-z-]+)/$@', |
|
28 | + 'replace' => '/'), |
|
29 | + (object) array( |
|
30 | + 'pattern' => '@/tag/([a-z-]+)/page/([0-9]+)/$@', |
|
31 | + 'replace' => '/')); |
|
32 | + } |
|
33 | 33 | |
34 | - protected function get_direct_array() |
|
35 | - { |
|
36 | - return array( |
|
37 | - (object) array( |
|
38 | - 'match' => '/', |
|
39 | - 'controller' => 'HomeController'), |
|
40 | - (object) array( |
|
41 | - 'match' => '/about/', |
|
42 | - 'controller' => 'AboutController'), |
|
43 | - (object) array( |
|
44 | - 'match' => '/page/([0-9]+)/', |
|
45 | - 'controller' => 'HomeController'), |
|
46 | - (object) array( |
|
47 | - 'match' => '/([a-z]+)/', |
|
48 | - 'controller' => 'TagController'), |
|
49 | - (object) array( |
|
50 | - 'match' => '/([a-z]+)/page/([0-9]+)/', |
|
51 | - 'controller' => 'TagController'), |
|
52 | - (object) array( |
|
53 | - 'match' => '/([a-z]+)/([0-9]+)/', |
|
54 | - 'controller' => 'PostController')); |
|
55 | - } |
|
34 | + protected function get_direct_array() |
|
35 | + { |
|
36 | + return array( |
|
37 | + (object) array( |
|
38 | + 'match' => '/', |
|
39 | + 'controller' => 'HomeController'), |
|
40 | + (object) array( |
|
41 | + 'match' => '/about/', |
|
42 | + 'controller' => 'AboutController'), |
|
43 | + (object) array( |
|
44 | + 'match' => '/page/([0-9]+)/', |
|
45 | + 'controller' => 'HomeController'), |
|
46 | + (object) array( |
|
47 | + 'match' => '/([a-z]+)/', |
|
48 | + 'controller' => 'TagController'), |
|
49 | + (object) array( |
|
50 | + 'match' => '/([a-z]+)/page/([0-9]+)/', |
|
51 | + 'controller' => 'TagController'), |
|
52 | + (object) array( |
|
53 | + 'match' => '/([a-z]+)/([0-9]+)/', |
|
54 | + 'controller' => 'PostController')); |
|
55 | + } |
|
56 | 56 | |
57 | 57 | } |
58 | 58 |
@@ -2,11 +2,10 @@ discard block |
||
2 | 2 | |
3 | 3 | Loader::load('router', 'Router'); |
4 | 4 | |
5 | -class LifestreamRouter extends Router |
|
6 | -{ |
|
5 | +class LifestreamRouter extends Router |
|
6 | +{ |
|
7 | 7 | |
8 | - protected function get_redirect_array() |
|
9 | - { |
|
8 | + protected function get_redirect_array() { |
|
10 | 9 | return array( |
11 | 10 | (object) array( |
12 | 11 | 'pattern' => '@/index.(html|htm|php)$@', |
@@ -31,8 +30,7 @@ discard block |
||
31 | 30 | 'replace' => '/')); |
32 | 31 | } |
33 | 32 | |
34 | - protected function get_direct_array() |
|
35 | - { |
|
33 | + protected function get_direct_array() { |
|
36 | 34 | return array( |
37 | 35 | (object) array( |
38 | 36 | 'match' => '/', |
@@ -5,22 +5,22 @@ |
||
5 | 5 | class AJAXRouter extends Router |
6 | 6 | { |
7 | 7 | |
8 | - protected function get_redirect_array() |
|
9 | - { |
|
10 | - return array( |
|
11 | - (object) array( |
|
12 | - 'pattern' => '@^/$@', |
|
13 | - 'replace' => 'https://home.jacobemerick.com/')); |
|
14 | - } |
|
8 | + protected function get_redirect_array() |
|
9 | + { |
|
10 | + return array( |
|
11 | + (object) array( |
|
12 | + 'pattern' => '@^/$@', |
|
13 | + 'replace' => 'https://home.jacobemerick.com/')); |
|
14 | + } |
|
15 | 15 | |
16 | - protected function get_direct_array() |
|
17 | - { |
|
18 | - return array( |
|
19 | - (object) array( |
|
20 | - 'match' => '/get/portfolioImage.json', |
|
21 | - 'controller' => 'GetPortfolioImageController'), |
|
16 | + protected function get_direct_array() |
|
17 | + { |
|
18 | + return array( |
|
19 | + (object) array( |
|
20 | + 'match' => '/get/portfolioImage.json', |
|
21 | + 'controller' => 'GetPortfolioImageController'), |
|
22 | 22 | ); |
23 | - } |
|
23 | + } |
|
24 | 24 | |
25 | 25 | } |
26 | 26 |
@@ -2,19 +2,17 @@ |
||
2 | 2 | |
3 | 3 | Loader::load('router', 'Router'); |
4 | 4 | |
5 | -class AJAXRouter extends Router |
|
6 | -{ |
|
5 | +class AJAXRouter extends Router |
|
6 | +{ |
|
7 | 7 | |
8 | - protected function get_redirect_array() |
|
9 | - { |
|
8 | + protected function get_redirect_array() { |
|
10 | 9 | return array( |
11 | 10 | (object) array( |
12 | 11 | 'pattern' => '@^/$@', |
13 | 12 | 'replace' => 'https://home.jacobemerick.com/')); |
14 | 13 | } |
15 | 14 | |
16 | - protected function get_direct_array() |
|
17 | - { |
|
15 | + protected function get_direct_array() { |
|
18 | 16 | return array( |
19 | 17 | (object) array( |
20 | 18 | 'match' => '/get/portfolioImage.json', |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | protected $api; |
15 | 15 | |
16 | 16 | /** |
17 | - * @param Jacobemerick\CommentService\Api\DefaultApi $api |
|
17 | + * @param DefaultApi $api |
|
18 | 18 | */ |
19 | 19 | public function __construct(DefaultApi $api) |
20 | 20 | { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | - * @param Jacobemerick\CommentService\Model\Comment $comment |
|
62 | + * @param Comment $comment |
|
63 | 63 | * @return array |
64 | 64 | */ |
65 | 65 | protected function deserializeComment(Comment $comment) |
@@ -5,8 +5,8 @@ discard block |
||
5 | 5 | use Jacobemerick\CommentService\Api\DefaultApi; |
6 | 6 | use Jacobemerick\CommentService\Model\Comment; |
7 | 7 | |
8 | -class ServiceCommentRepository implements CommentRepositoryInterface |
|
9 | -{ |
|
8 | +class ServiceCommentRepository implements CommentRepositoryInterface |
|
9 | +{ |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * @var Jacobemerick\CommentService\Api\DefaultApi |
@@ -16,8 +16,7 @@ discard block |
||
16 | 16 | /** |
17 | 17 | * @param Jacobemerick\CommentService\Api\DefaultApi $api |
18 | 18 | */ |
19 | - public function __construct(DefaultApi $api) |
|
20 | - { |
|
19 | + public function __construct(DefaultApi $api) { |
|
21 | 20 | $this->api = $api; |
22 | 21 | } |
23 | 22 | |
@@ -26,8 +25,7 @@ discard block |
||
26 | 25 | * @return array |
27 | 26 | * @throws Jacobemerick\CommentService\ApiException |
28 | 27 | */ |
29 | - public function createComment(array $comment) |
|
30 | - { |
|
28 | + public function createComment(array $comment) { |
|
31 | 29 | $response = $this->api->createComment($comment); |
32 | 30 | return $this->deserializeComment($response); |
33 | 31 | } |
@@ -37,8 +35,7 @@ discard block |
||
37 | 35 | * @return array |
38 | 36 | * @throws Jacobemerick\CommentService\ApiException |
39 | 37 | */ |
40 | - public function getComment($commentId) |
|
41 | - { |
|
38 | + public function getComment($commentId) { |
|
42 | 39 | $response = $this->api->getComment($commentId); |
43 | 40 | return $this->deserializeComment($response); |
44 | 41 | } |
@@ -52,8 +49,7 @@ discard block |
||
52 | 49 | * @return array |
53 | 50 | * @throws Jacobemerick\CommentService\ApiException |
54 | 51 | */ |
55 | - public function getComments($domain = null, $path = null, $page = null, $perPage = null, $order = null) |
|
56 | - { |
|
52 | + public function getComments($domain = null, $path = null, $page = null, $perPage = null, $order = null) { |
|
57 | 53 | $response = $this->api->getComments($page, $perPage, $order, $domain, $path); |
58 | 54 | return array_map([$this, 'deserializeComment'], $response); |
59 | 55 | } |
@@ -62,8 +58,7 @@ discard block |
||
62 | 58 | * @param Jacobemerick\CommentService\Model\Comment $comment |
63 | 59 | * @return array |
64 | 60 | */ |
65 | - protected function deserializeComment(Comment $comment) |
|
66 | - { |
|
61 | + protected function deserializeComment(Comment $comment) { |
|
67 | 62 | return [ |
68 | 63 | 'id' => $comment->getId(), |
69 | 64 | 'commenter' => [ |
@@ -14,7 +14,7 @@ |
||
14 | 14 | protected $api; |
15 | 15 | |
16 | 16 | /** |
17 | - * @param Jacobemerick\CommentService\Api\DefaultApi $api |
|
17 | + * @param DefaultApi $api |
|
18 | 18 | */ |
19 | 19 | public function __construct(DefaultApi $api) |
20 | 20 | { |
@@ -5,8 +5,8 @@ discard block |
||
5 | 5 | use Jacobemerick\CommentService\Api\DefaultApi; |
6 | 6 | use Jacobemerick\CommentService\Model\Commenter; |
7 | 7 | |
8 | -class ServiceCommenterRepository implements CommenterRepositoryInterface |
|
9 | -{ |
|
8 | +class ServiceCommenterRepository implements CommenterRepositoryInterface |
|
9 | +{ |
|
10 | 10 | |
11 | 11 | /** |
12 | 12 | * @var Jacobemerick\CommentService\Api\DefaultApi |
@@ -16,8 +16,7 @@ discard block |
||
16 | 16 | /** |
17 | 17 | * @param Jacobemerick\CommentService\Api\DefaultApi $api |
18 | 18 | */ |
19 | - public function __construct(DefaultApi $api) |
|
20 | - { |
|
19 | + public function __construct(DefaultApi $api) { |
|
21 | 20 | $this->api = $api; |
22 | 21 | } |
23 | 22 | |
@@ -26,8 +25,7 @@ discard block |
||
26 | 25 | * @return array |
27 | 26 | * @throws Jacobemerick\CommentService\ApiException |
28 | 27 | */ |
29 | - public function createCommenter(array $commenter) |
|
30 | - { |
|
28 | + public function createCommenter(array $commenter) { |
|
31 | 29 | $response = $this->api->createCommenter($commenter); |
32 | 30 | return $this->deserializeCommenter($response); |
33 | 31 | } |
@@ -37,8 +35,7 @@ discard block |
||
37 | 35 | * @return array |
38 | 36 | * @throws Jacobemerick\CommentService\ApiException |
39 | 37 | */ |
40 | - public function getCommenter($commenterId) |
|
41 | - { |
|
38 | + public function getCommenter($commenterId) { |
|
42 | 39 | $response = $this->api->getCommenter($commenterId); |
43 | 40 | return $this->deserializeCommenter($response); |
44 | 41 | } |
@@ -49,8 +46,7 @@ discard block |
||
49 | 46 | * @return array |
50 | 47 | * @throws Jacobemerick\CommentService\ApiException |
51 | 48 | */ |
52 | - public function getCommenters($page = null, $perPage = null) |
|
53 | - { |
|
49 | + public function getCommenters($page = null, $perPage = null) { |
|
54 | 50 | $response = $this->api->getCommenters($page, $perPage); |
55 | 51 | return array_map([$this, 'deserializeCommenter'], $response); |
56 | 52 | } |
@@ -59,8 +55,7 @@ discard block |
||
59 | 55 | * @param Jacobemerick\CommentService\Model\Commenter |
60 | 56 | * @return array |
61 | 57 | */ |
62 | - protected function deserializeCommenter(Commenter $commenter) |
|
63 | - { |
|
58 | + protected function deserializeCommenter(Commenter $commenter) { |
|
64 | 59 | return [ |
65 | 60 | 'id' => $commenter->getId(), |
66 | 61 | 'name' => $commenter->getName(), |