Total Complexity | 2 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class CoursePresenter extends Presenter |
||
9 | { |
||
10 | /** |
||
11 | * The year of this course in ordinal format. |
||
12 | * |
||
13 | * @return string |
||
14 | */ |
||
15 | public function getOrdinalYear() |
||
16 | { |
||
17 | $formatter = new NumberFormatter(app()->getLocale(), NumberFormatter::SPELLOUT); |
||
|
|||
18 | $formatter->setTextAttribute(NumberFormatter::DEFAULT_RULESET, '%spellout-ordinal'); |
||
19 | |||
20 | return ucfirst($formatter->format($this->entity->year)); |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * The semester of this course in ordinal format. |
||
25 | * |
||
26 | * @return string |
||
27 | */ |
||
28 | public function getOrdinalSemester() |
||
33 | } |
||
34 | } |
||
35 |