Passed
Push — master ( 30fc4f...0239c4 )
by Anton
01:49 queued 10s
created

Table   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 9
dl 0
loc 28
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getColumns() 0 3 1
A getIndexes() 0 3 1
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 Cycle\Annotated\Annotation\Table\Index;
12
use Spiral\Annotations\AbstractAnnotation;
13
14
final class Table extends AbstractAnnotation
15
{
16
    public const NAME   = 'table';
17
    public const SCHEMA = [
18
        'columns' => [Column::class],
19
        'indexes' => [Index::class],
20
    ];
21
22
    /** @var array */
23
    protected $columns = [];
24
25
    /** @var array */
26
    protected $indexes = [];
27
28
    /**
29
     * @return Column[]
30
     */
31
    public function getColumns(): array
32
    {
33
        return $this->columns;
34
    }
35
36
    /**
37
     * @return Index[]
38
     */
39
    public function getIndexes(): array
40
    {
41
        return $this->indexes;
42
    }
43
}