@@ -7,22 +7,22 @@ discard block |
||
7 | 7 | |
8 | 8 | use Jacobemerick\Web\Domain\Comment\Comment\ServiceCommentRepository; |
9 | 9 | |
10 | -class CommentSubmitModule |
|
11 | -{ |
|
10 | +class CommentSubmitModule |
|
11 | +{ |
|
12 | 12 | |
13 | 13 | private $site; |
14 | 14 | private $path; |
15 | 15 | private $fullPath; |
16 | 16 | |
17 | - public function __construct($site, $path, $fullPath, $pageTitle) |
|
18 | - { |
|
17 | + public function __construct($site, $path, $fullPath, $pageTitle) |
|
18 | + { |
|
19 | 19 | $this->site = $site; |
20 | 20 | $this->path = $path; |
21 | 21 | $this->fullPath = $fullPath; |
22 | 22 | } |
23 | 23 | |
24 | - public function activate() |
|
25 | - { |
|
24 | + public function activate() |
|
25 | + { |
|
26 | 26 | // todo why is this responsible for checking on valid calls |
27 | 27 | if (!Request::hasPost()) { |
28 | 28 | return false; |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | $this->redirectToComment($commentId); |
45 | 45 | } |
46 | 46 | |
47 | - private function checkValidation() |
|
48 | - { |
|
47 | + private function checkValidation() |
|
48 | + { |
|
49 | 49 | $errors = array(); |
50 | 50 | if (!Validate::checkRequest('post', 'name', 'name')) { |
51 | 51 | $errors['name'] = 'You must include a valid name'; |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | return $errors; |
70 | 70 | } |
71 | 71 | |
72 | - private function save(array $data) |
|
73 | - { |
|
72 | + private function save(array $data) |
|
73 | + { |
|
74 | 74 | $path = $_SERVER['REQUEST_URI']; |
75 | 75 | $path = explode('/', $path); |
76 | 76 | $path = array_filter($path); |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | return $response->getId(); |
107 | 107 | } |
108 | 108 | |
109 | - private function redirectToComment($commentId) |
|
110 | - { |
|
109 | + private function redirectToComment($commentId) |
|
110 | + { |
|
111 | 111 | $url = ''; |
112 | 112 | $url .= $this->fullPath; |
113 | 113 | $url .= "#comment-{$commentId}"; |