Passed
Push — 2.0 ( 27f708...77f99f )
by Kirill
03:04
created

DocsPagesQuery::queryArguments()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of laravel.su package.
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace App\GraphQL\Queries;
10
11
use App\GraphQL\Types\DocsPageType;
12
use App\Models\DocsPage;
13
use App\GraphQL\Serializers\DocsPageSerializer;
14
use GraphQL\Type\Definition\Type;
15
16
/**
17
 * Class DocsPagesQuery
18
 * @package App\GraphQL\Queries
19
 */
20
class DocsPagesQuery extends AbstractCollectionQuery
21
{
22
    /**
23
     * @var array
24
     */
25
    protected $attributes = [
26
        'name' => 'docs_pages'
27
    ];
28
29
    /**
30
     * @return \GraphQL\Type\Definition\ListOfType
31
     */
32
    public function type()
33
    {
34
        return Type::listOf(\GraphQL::type(DocsPageType::getName()));
35
    }
36
37
    /**
38
     * @return array
39
     */
40
    protected function queryArguments(): array
41
    {
42
        return [];
43
    }
44
45
    /**
46
     * @param $root
47
     * @param array $args
48
     * @return \Illuminate\Support\Collection
49
     */
50
    public function resolve($root, array $args = [])
0 ignored issues
show
Unused Code introduced by
The parameter $root is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $args is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
51
    {
52
        $query = $this->queryFor(DocsPage::class)
53
            ->with('docs');
54
55
        return DocsPageSerializer::collection($query->get());
56
    }
57
}