Code Duplication    Length = 9-9 lines in 5 locations

src/Config/Field/InputFieldConfig.php 1 location

@@ 18-26 (lines=9) @@
15
class InputFieldConfig extends AbstractConfig
16
{
17
18
    public function getRules()
19
    {
20
        return [
21
            'name'        => ['type' => TypeService::TYPE_STRING, 'final' => true],
22
            'type'        => ['type' => TypeService::TYPE_ANY_INPUT, 'final' => true],
23
            'default'     => ['type' => TypeService::TYPE_ANY],
24
            'description' => ['type' => TypeService::TYPE_STRING],
25
        ];
26
    }
27
28
    public function getDefaultValue()
29
    {

src/Config/Object/InterfaceTypeConfig.php 1 location

@@ 23-31 (lines=9) @@
20
{
21
    use FieldsAwareConfigTrait, ArgumentsAwareConfigTrait;
22
23
    public function getRules()
24
    {
25
        return [
26
            'name'        => ['type' => TypeService::TYPE_STRING, 'final' => true],
27
            'fields'      => ['type' => TypeService::TYPE_ARRAY_OF_FIELDS_CONFIG, 'final' => true],
28
            'description' => ['type' => TypeService::TYPE_STRING],
29
            'resolveType' => ['type' => TypeService::TYPE_CALLABLE, 'final' => true],
30
        ];
31
    }
32
33
    protected function build()
34
    {

src/Config/Object/ObjectTypeConfig.php 1 location

@@ 22-30 (lines=9) @@
19
20
    use FieldsAwareConfigTrait;
21
22
    public function getRules()
23
    {
24
        return [
25
            'name'        => ['type' => TypeService::TYPE_STRING, 'required' => true],
26
            'description' => ['type' => TypeService::TYPE_STRING],
27
            'fields'      => ['type' => TypeService::TYPE_ARRAY_OF_FIELDS_CONFIG, 'final' => true],
28
            'interfaces'  => ['type' => TypeService::TYPE_ARRAY_OF_INTERFACES]
29
        ];
30
    }
31
32
    protected function build()
33
    {

src/Config/Object/UnionTypeConfig.php 1 location

@@ 22-30 (lines=9) @@
19
{
20
    use FieldsAwareConfigTrait, ArgumentsAwareConfigTrait;
21
22
    public function getRules()
23
    {
24
        return [
25
            'name'        => ['type' => TypeService::TYPE_STRING, 'required' => true],
26
            'types'       => ['type' => TypeService::TYPE_ARRAY_OF_OBJECT_TYPES],
27
            'description' => ['type' => TypeService::TYPE_STRING],
28
            'resolveType' => ['type' => TypeService::TYPE_CALLABLE, 'final' => true]
29
        ];
30
    }
31
}
32

src/Config/Schema/SchemaConfig.php 1 location

@@ 33-41 (lines=9) @@
30
    }
31
32
33
    public function getRules()
34
    {
35
        return [
36
            'query'    => ['type' => TypeService::TYPE_OBJECT_TYPE, 'required' => true],
37
            'mutation' => ['type' => TypeService::TYPE_OBJECT_TYPE],
38
            'types'    => ['type' => TypeService::TYPE_ARRAY],
39
            'name'     => ['type' => TypeService::TYPE_STRING],
40
        ];
41
    }
42
43
    protected function build()
44
    {