Completed
Push — master ( 0c5b7b...2c9e38 )
by Tom
13:30
created

DDLTable::setColumns()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * Copyright © 2016 netz98 new media GmbH. All rights reserved.
4
 * See COPYING.txt for license details.
5
 */
6
7
namespace N98\Magento\Command\Developer\Console\Structure;
8
9
class DDLTable
10
{
11
    /**
12
     * @var string
13
     */
14
    private $name;
15
16
    /**
17
     * @var string
18
     */
19
    private $comment;
20
21
    /**
22
     * @var array|DDLTableColumn[]
23
     */
24
    private $columnDefinitions;
25
26
    /**
27
     * DDLTable constructor.
28
     * @param string $tableName
0 ignored issues
show
Documentation introduced by
Should the type for parameter $tableName not be string|null?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
29
     * @param string $tableComment
0 ignored issues
show
Documentation introduced by
Should the type for parameter $tableComment not be string|null?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
30
     * @param DDLTableColumn[] $columnDefinitions
31
     */
32
    public function __construct($tableName = null, $tableComment = null, array $columnDefinitions = [])
33
    {
34
        $this->name = $tableName;
35
        $this->comment = $tableComment;
36
        $this->columnDefinitions = $columnDefinitions;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getName()
43
    {
44
        return $this->name;
45
    }
46
47
    /**
48
     * @param string $name
49
     */
50
    public function setName($name)
51
    {
52
        $this->name = $name;
53
    }
54
55
    /**
56
     * @return string
57
     */
58
    public function getComment()
59
    {
60
        return $this->comment;
61
    }
62
63
    /**
64
     * @param string $comment
65
     */
66
    public function setComment($comment)
67
    {
68
        $this->comment = $comment;
69
    }
70
71
    /**
72
     * @return array|DDLTableColumn[]
73
     */
74
    public function getColumns()
75
    {
76
        return $this->columnDefinitions;
77
    }
78
79
    /**
80
     * @param array|DDLTableColumn[] $columnDefinitions
81
     */
82
    public function setColumns($columnDefinitions)
83
    {
84
        $this->columnDefinitions = $columnDefinitions;
85
    }
86
}
87