| Total Complexity | 3 |
| Total Lines | 138 |
| Duplicated Lines | 0 % |
| Coverage | 71.43% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class Uninflected |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Default words that should not be inflected. |
||
| 11 | * |
||
| 12 | * @var string[] |
||
| 13 | */ |
||
| 14 | public const DEFAULT = [ |
||
| 15 | '.*?media', |
||
| 16 | 'Amoyese', |
||
| 17 | 'audio', |
||
| 18 | 'bison', |
||
| 19 | 'Borghese', |
||
| 20 | 'bream', |
||
| 21 | 'breeches', |
||
| 22 | 'britches', |
||
| 23 | 'buffalo', |
||
| 24 | 'cantus', |
||
| 25 | 'carp', |
||
| 26 | 'chassis', |
||
| 27 | 'clippers', |
||
| 28 | 'cod', |
||
| 29 | 'coitus', |
||
| 30 | 'compensation', |
||
| 31 | 'Congoese', |
||
| 32 | 'contretemps', |
||
| 33 | 'coreopsis', |
||
| 34 | 'corps', |
||
| 35 | 'data', |
||
| 36 | 'debris', |
||
| 37 | 'deer', |
||
| 38 | 'diabetes', |
||
| 39 | 'djinn', |
||
| 40 | 'education', |
||
| 41 | 'eland', |
||
| 42 | 'elk', |
||
| 43 | 'emoji', |
||
| 44 | 'equipment', |
||
| 45 | 'evidence', |
||
| 46 | 'Faroese', |
||
| 47 | 'feedback', |
||
| 48 | 'fish', |
||
| 49 | 'flounder', |
||
| 50 | 'Foochowese', |
||
| 51 | 'Furniture', |
||
| 52 | 'furniture', |
||
| 53 | 'gallows', |
||
| 54 | 'Genevese', |
||
| 55 | 'Genoese', |
||
| 56 | 'Gilbertese', |
||
| 57 | 'gold', |
||
| 58 | 'headquarters', |
||
| 59 | 'herpes', |
||
| 60 | 'hijinks', |
||
| 61 | 'Hottentotese', |
||
| 62 | 'information', |
||
| 63 | 'innings', |
||
| 64 | 'jackanapes', |
||
| 65 | 'jedi', |
||
| 66 | 'Kiplingese', |
||
| 67 | 'knowledge', |
||
| 68 | 'Kongoese', |
||
| 69 | 'love', |
||
| 70 | 'Lucchese', |
||
| 71 | 'Luggage', |
||
| 72 | 'mackerel', |
||
| 73 | 'Maltese', |
||
| 74 | 'metadata', |
||
| 75 | 'mews', |
||
| 76 | 'moose', |
||
| 77 | 'mumps', |
||
| 78 | 'Nankingese', |
||
| 79 | 'news', |
||
| 80 | 'nexus', |
||
| 81 | 'Niasese', |
||
| 82 | 'nutrition', |
||
| 83 | 'offspring', |
||
| 84 | 'Pekingese', |
||
| 85 | 'Piedmontese', |
||
| 86 | 'pincers', |
||
| 87 | 'Pistoiese', |
||
| 88 | 'plankton', |
||
| 89 | 'pliers', |
||
| 90 | 'pokemon', |
||
| 91 | 'police', |
||
| 92 | 'Portuguese', |
||
| 93 | 'proceedings', |
||
| 94 | 'rabies', |
||
| 95 | 'rain', |
||
| 96 | 'rhinoceros', |
||
| 97 | 'rice', |
||
| 98 | 'salmon', |
||
| 99 | 'Sarawakese', |
||
| 100 | 'scissors', |
||
| 101 | 'sea[- ]bass', |
||
| 102 | 'series', |
||
| 103 | 'Shavese', |
||
| 104 | 'shears', |
||
| 105 | 'sheep', |
||
| 106 | 'siemens', |
||
| 107 | 'species', |
||
| 108 | 'staff', |
||
| 109 | 'swine', |
||
| 110 | 'traffic', |
||
| 111 | 'trousers', |
||
| 112 | 'trout', |
||
| 113 | 'tuna', |
||
| 114 | 'us', |
||
| 115 | 'Vermontese', |
||
| 116 | 'Wenchowese', |
||
| 117 | 'wheat', |
||
| 118 | 'whiting', |
||
| 119 | 'wildebeest', |
||
| 120 | 'Yengeese', |
||
| 121 | ]; |
||
| 122 | |||
| 123 | /** @var string[] */ |
||
| 124 | private $uninflected; |
||
| 125 | |||
| 126 | /** |
||
| 127 | * @param string[] $uninflected |
||
| 128 | */ |
||
| 129 | 4 | public function __construct(array $uninflected) |
|
| 130 | { |
||
| 131 | 4 | $this->uninflected = $uninflected; |
|
| 132 | 4 | } |
|
| 133 | |||
| 134 | /** |
||
| 135 | * @return string[] |
||
| 136 | */ |
||
| 137 | 4 | public function getUninflected() : array |
|
| 140 | } |
||
| 141 | |||
| 142 | public function addUninflected(string $word) : void |
||
| 147 |