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

BaseDependent::__sleep()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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\Definitions\BaseTypeDefinition;
13
use Railt\SDL\Contracts\Definitions\TypeDefinition;
14
use Railt\SDL\Contracts\Dependent\DependentDefinition;
15
16
/**
17
 * Class BaseDependentType
18
 */
19
abstract class BaseDependent extends BaseTypeDefinition implements DependentDefinition
20
{
21
    /**
22
     * @var TypeDefinition|mixed
23
     */
24
    protected $parent;
25
26
    /**
27
     * @return TypeDefinition
28
     */
29 902
    public function getParent(): TypeDefinition
30
    {
31 902
        return $this->parent;
32
    }
33
34
    /**
35
     * @return array
36
     */
37 1163
    public function __sleep(): array
38
    {
39 1163
        return \array_merge(parent::__sleep(), [
40 1163
            'parent',
41
        ]);
42
    }
43
}
44