Code Duplication    Length = 23-23 lines in 4 locations

src/Presentation/Api/GraphQl/Node/Comment/Connection/Author/CommentAuthorsConnectionResolverMap.php 1 location

@@ 23-45 (lines=23) @@
20
use Overblog\GraphQLBundle\Relay\Connection\Output\Connection;
21
use Overblog\GraphQLBundle\Resolver\ResolverMap;
22
23
final class CommentAuthorsConnectionResolverMap extends ResolverMap
24
{
25
    /**
26
     * @var CommentAuthorsResolver
27
     */
28
    private $commentAuthorsResolver;
29
30
    public function __construct(CommentAuthorsResolver $commentAuthorsResolver)
31
    {
32
        $this->commentAuthorsResolver = $commentAuthorsResolver;
33
    }
34
35
    public function map(): array
36
    {
37
        return [
38
            'CommentAuthorsConnection' => [
39
                'count' => function (Connection $value, Argument $args, ArrayObject $context, ResolveInfo $info) {
40
                    return $this->commentAuthorsResolver->countEdges($value);
41
                },
42
            ],
43
        ];
44
    }
45
}
46

src/Presentation/Api/GraphQl/Node/Post/Connection/Author/PostAuthorsConnectionResolverMap.php 1 location

@@ 23-45 (lines=23) @@
20
use Overblog\GraphQLBundle\Relay\Connection\Output\Connection;
21
use Overblog\GraphQLBundle\Resolver\ResolverMap;
22
23
final class PostAuthorsConnectionResolverMap extends ResolverMap
24
{
25
    /**
26
     * @var PostAuthorsResolver
27
     */
28
    private $postAuthorsResolver;
29
30
    public function __construct(PostAuthorsResolver $postAuthorsResolver)
31
    {
32
        $this->postAuthorsResolver = $postAuthorsResolver;
33
    }
34
35
    public function map(): array
36
    {
37
        return [
38
            'PostAuthorsConnection' => [
39
                'count' => function (Connection $value, Argument $args, ArrayObject $context, ResolveInfo $info) {
40
                    return $this->postAuthorsResolver->countEdges($value);
41
                },
42
            ],
43
        ];
44
    }
45
}
46

src/Presentation/Api/GraphQl/Node/Post/Connection/Comment/PostCommentsConnectionResolverMap.php 1 location

@@ 23-45 (lines=23) @@
20
use Overblog\GraphQLBundle\Relay\Connection\Output\Connection;
21
use Overblog\GraphQLBundle\Resolver\ResolverMap;
22
23
final class PostCommentsConnectionResolverMap extends ResolverMap
24
{
25
    /**
26
     * @var PostCommentsResolver
27
     */
28
    private $postCommentsResolver;
29
30
    public function __construct(PostCommentsResolver $postCommentsResolver)
31
    {
32
        $this->postCommentsResolver = $postCommentsResolver;
33
    }
34
35
    public function map(): array
36
    {
37
        return [
38
            'PostCommentsConnection' => [
39
                'count' => function (Connection $value, Argument $args, ArrayObject $context, ResolveInfo $info) {
40
                    return $this->postCommentsResolver->countEdges($value);
41
                },
42
            ],
43
        ];
44
    }
45
}
46

src/Presentation/Api/GraphQl/Node/Post/Connection/Tag/PostTagsConnectionResolverMap.php 1 location

@@ 23-45 (lines=23) @@
20
use Overblog\GraphQLBundle\Relay\Connection\Output\Connection;
21
use Overblog\GraphQLBundle\Resolver\ResolverMap;
22
23
final class PostTagsConnectionResolverMap extends ResolverMap
24
{
25
    /**
26
     * @var PostTagsResolver
27
     */
28
    private $postTagsResolver;
29
30
    public function __construct(PostTagsResolver $postTagsResolver)
31
    {
32
        $this->postTagsResolver = $postTagsResolver;
33
    }
34
35
    public function map(): array
36
    {
37
        return [
38
            'PostTagsConnection' => [
39
                'count' => function (Connection $value, Argument $args, ArrayObject $context, ResolveInfo $info) {
40
                    return $this->postTagsResolver->countEdges($value);
41
                },
42
            ],
43
        ];
44
    }
45
}
46