@@ -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(), |