| Total Complexity | 9 |
| Total Lines | 115 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class Category |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var int |
||
| 21 | */ |
||
| 22 | private $id; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var int |
||
| 26 | */ |
||
| 27 | private $parentId; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var string |
||
| 31 | */ |
||
| 32 | private $name; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var array |
||
| 36 | */ |
||
| 37 | private $attributes = []; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return int |
||
| 41 | */ |
||
| 42 | public function getId() |
||
| 43 | { |
||
| 44 | return $this->id; |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @param int $id |
||
| 49 | * |
||
| 50 | * @return Category |
||
| 51 | */ |
||
| 52 | public function setId($id) |
||
| 53 | { |
||
| 54 | $this->id = $id; |
||
| 55 | |||
| 56 | return $this; |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @return int |
||
| 61 | */ |
||
| 62 | public function getParentId() |
||
| 63 | { |
||
| 64 | return $this->parentId; |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @param int $parentId |
||
| 69 | * |
||
| 70 | * @return Category |
||
| 71 | */ |
||
| 72 | public function setParentId($parentId) |
||
| 73 | { |
||
| 74 | $this->parentId = $parentId; |
||
| 75 | |||
| 76 | return $this; |
||
| 77 | } |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @return string |
||
| 81 | */ |
||
| 82 | public function getName() |
||
| 85 | } |
||
| 86 | |||
| 87 | /** |
||
| 88 | * @param string $name |
||
| 89 | * |
||
| 90 | * @return Category |
||
| 91 | */ |
||
| 92 | public function setName($name) |
||
| 93 | { |
||
| 94 | $this->name = $name; |
||
| 95 | |||
| 96 | return $this; |
||
| 97 | } |
||
| 98 | |||
| 99 | /** |
||
| 100 | * @return array |
||
| 101 | */ |
||
| 102 | public function getAttributes() |
||
| 105 | } |
||
| 106 | |||
| 107 | /** |
||
| 108 | * Sets list of custom attributes (Array of arrays [['name' => ?, 'value' => ?]]) |
||
| 109 | * |
||
| 110 | * @param array $attributes |
||
| 111 | * |
||
| 112 | * @return Category |
||
| 113 | */ |
||
| 114 | public function setAttributes(array $attributes) |
||
| 119 | } |
||
| 120 | |||
| 121 | /** |
||
| 122 | * @param string $attributeName |
||
| 123 | * @param mixed $value |
||
| 124 | * |
||
| 125 | * @return Category |
||
| 126 | */ |
||
| 127 | public function pushAttribute($attributeName, $value) |
||
| 132 | } |
||
| 133 | } |
||
| 134 |