| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Chekote\NounStore; |
||
| 5 | class Key |
||
| 6 | { |
||
| 7 | use Singleton; |
||
| 8 | |||
| 9 | const ORDINAL_ST = 'st'; |
||
| 10 | const ORDINAL_ND = 'nd'; |
||
| 11 | const ORDINAL_RD = 'rd'; |
||
| 12 | const ORDINAL_TH = 'th'; |
||
| 13 | |||
| 14 | protected static $ordinals = [ |
||
| 15 | 0 => self::ORDINAL_TH, |
||
| 16 | 1 => self::ORDINAL_ST, |
||
| 17 | 2 => self::ORDINAL_ND, |
||
| 18 | 3 => self::ORDINAL_RD, |
||
| 19 | 4 => self::ORDINAL_TH, |
||
| 20 | 5 => self::ORDINAL_TH, |
||
| 21 | 6 => self::ORDINAL_TH, |
||
| 22 | 7 => self::ORDINAL_TH, |
||
| 23 | 8 => self::ORDINAL_TH, |
||
| 24 | 9 => self::ORDINAL_TH, |
||
| 25 | ]; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Provides the ordinal notation for the specified nth number. |
||
| 29 | * |
||
| 30 | * @param int $nth the number to determine the ordinal for |
||
| 31 | * @return string the ordinal |
||
| 32 | */ |
||
| 33 | 38 | public function getOrdinal($nth) |
|
| 42 |