Passed
Push — master ( 1e6bc1...7a1c1c )
by Anton
04:14
created

Embeddable::getRole()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php declare(strict_types=1);
2
/**
3
 * Spiral Framework.
4
 *
5
 * @license   MIT
6
 * @author    Anton Titov (Wolfy-J)
7
 */
8
9
namespace Cycle\Annotated\Annotation;
10
11
use Spiral\Annotations\AbstractAnnotation;
12
use Spiral\Annotations\Parser;
13
14
final class Embeddable extends AbstractAnnotation
15
{
16
    public const NAME   = 'embeddable';
17
    public const SCHEMA = [
18
        'role'         => Parser::STRING,
19
        'mapper'       => Parser::STRING,
20
        'columnPrefix' => Parser::STRING,
21
        'columns'      => [Column::class],
22
    ];
23
24
    /** @var string|null */
25
    protected $role;
26
27
    /** @var string|null */
28
    protected $mapper;
29
30
    /** @var string */
31
    protected $columnPrefix = '';
32
33
    /** @var array */
34
    protected $columns = [];
35
36
    /**
37
     * @return string|null
38
     */
39
    public function getRole(): ?string
40
    {
41
        return $this->role;
42
    }
43
44
    /**
45
     * @return string|null
46
     */
47
    public function getMapper(): ?string
48
    {
49
        return $this->mapper;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getColumnPrefix(): string
56
    {
57
        return $this->columnPrefix;
58
    }
59
60
    /**
61
     * @return Column[]
62
     */
63
    public function getColumns(): array
64
    {
65
        return $this->columns;
66
    }
67
}