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

BaseInterface::__sleep()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
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\Definitions;
11
12
use Railt\SDL\Base\Dependent\Field\BaseFieldsContainer;
13
use Railt\SDL\Base\Invocations\Directive\BaseDirectivesContainer;
14
use Railt\SDL\Contracts\Definitions\InterfaceDefinition;
15
use Railt\SDL\Contracts\Type;
16
17
/**
18
 * Class BaseInterface
19
 */
20
abstract class BaseInterface extends BaseTypeDefinition implements InterfaceDefinition
21
{
22
    use BaseFieldsContainer;
23
    use BaseDirectivesContainer;
24
25
    /**
26
     * Base type name
27
     */
28
    protected const TYPE_NAME = Type::INTERFACE;
29
30
    /**
31
     * @return array
32
     */
33
    public function __sleep(): array
34
    {
35
        return \array_merge(parent::__sleep(), [
36
            // trait HasFields
37
            'fields',
38
39
            // trait HasDirectives
40
            'directives',
41
        ]);
42
    }
43
}
44