| Total Complexity | 3 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class Labels extends Collection |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Label form for a single entity |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | protected $singularForm; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Label form for a multiple entities |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $pluralForm; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Set the singular labels using the given form. |
||
| 23 | * |
||
| 24 | * @param string $label The singular label form to use |
||
| 25 | * |
||
| 26 | * @return $this |
||
| 27 | */ |
||
| 28 | public function setSingular($label) |
||
| 29 | { |
||
| 30 | $this->singularForm = $label; |
||
| 31 | |||
| 32 | return $this; |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Set the plural labels using the given form. |
||
| 37 | * |
||
| 38 | * @param string $label The plural label form to use |
||
| 39 | * |
||
| 40 | * @return $this |
||
| 41 | */ |
||
| 42 | public function setPlural($label) |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Get all the labels as an array. |
||
| 51 | * |
||
| 52 | * @return array |
||
| 53 | */ |
||
| 54 | public function toArray() |
||
| 69 | } |
||
| 70 | } |
||
| 71 |