Completed
Push — master ( 296743...12eab9 )
by Kirill
36:17
created

BaseField   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 33
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __sleep() 0 16 1
1
<?php
2
/**
3
 * This file is part of Railt package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
declare(strict_types=1);
9
10
namespace Railt\SDL\Base\Dependent;
11
12
use Railt\SDL\Base\Behavior\BaseTypeIndicator;
13
use Railt\SDL\Base\Dependent\Argument\BaseArgumentsContainer;
14
use Railt\SDL\Base\Invocations\Directive\BaseDirectivesContainer;
15
use Railt\SDL\Contracts\Dependent\FieldDefinition;
16
use Railt\SDL\Contracts\Type;
17
18
/**
19
 * Class BaseField
20
 */
21
abstract class BaseField extends BaseDependent implements FieldDefinition
22
{
23
    use BaseTypeIndicator;
24
    use BaseArgumentsContainer;
25
    use BaseDirectivesContainer;
26
27
    /**
28
     * Field type name
29
     *
30
     * TODO or interface field
31
     */
32
    protected const TYPE_NAME = Type::OBJECT_FIELD;
33
34
    /**
35
     * @return array
36
     */
37 639
    public function __sleep(): array
38
    {
39 639
        return \array_merge(parent::__sleep(), [
40
            // trait HasArguments
41 639
            'arguments',
42
43
            // trait HasDirectives
44
            'directives',
45
46
            // trait AllowsTypeIndication
47
            'type',
48
            'isList',
49
            'isNonNull',
50
            'isListOfNonNulls',
51
        ]);
52
    }
53
}
54