| Total Complexity | 11 |
| Total Lines | 94 |
| Duplicated Lines | 0 % |
| Coverage | 85.71% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class GroupRef extends Group implements InterfaceSetMinMax |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var Group |
||
| 11 | */ |
||
| 12 | protected $wrapped; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var int |
||
| 16 | */ |
||
| 17 | protected $min = 1; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var int |
||
| 21 | */ |
||
| 22 | protected $max = 1; |
||
| 23 | |||
| 24 | 45 | public function __construct(Group $group) |
|
| 25 | { |
||
| 26 | 45 | parent::__construct($group->getSchema(), ''); |
|
| 27 | 45 | $this->wrapped = $group; |
|
| 28 | 45 | } |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @return int |
||
| 32 | */ |
||
| 33 | public function getMin() |
||
| 34 | { |
||
| 35 | return $this->min; |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param int $min |
||
| 40 | * |
||
| 41 | * @return $this |
||
| 42 | */ |
||
| 43 | 45 | public function setMin($min) |
|
| 44 | { |
||
| 45 | 45 | $this->min = $min; |
|
| 46 | |||
| 47 | 45 | return $this; |
|
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @return int |
||
| 52 | */ |
||
| 53 | 1 | public function getMax() |
|
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @param int $max |
||
| 60 | * |
||
| 61 | * @return $this |
||
| 62 | */ |
||
| 63 | 45 | public function setMax($max) |
|
| 64 | { |
||
| 65 | 45 | $this->max = $max; |
|
| 66 | |||
| 67 | 45 | return $this; |
|
| 68 | } |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @return string |
||
| 72 | */ |
||
| 73 | 1 | public function getName() |
|
| 74 | { |
||
| 75 | 1 | return $this->wrapped->getName(); |
|
| 76 | } |
||
| 77 | |||
| 78 | /** |
||
| 79 | * @return ElementItem[] |
||
| 80 | */ |
||
| 81 | 1 | public function getElements() |
|
| 96 | } |
||
| 97 | |||
| 98 | public function addElement(ElementItem $element) |
||
| 103 |