| Total Complexity | 9 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 14 | class StringUtility |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Get the plural form of an English word. |
||
| 18 | * |
||
| 19 | * @param string $value |
||
| 20 | * @param int $count |
||
| 21 | * @return string |
||
| 22 | */ |
||
| 23 | public static function plural($value, $count = 2) |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Determine if a given string starts with a given substring. |
||
| 30 | * |
||
| 31 | * @param string $haystack |
||
| 32 | * @param string|array $needles |
||
| 33 | * @return bool |
||
| 34 | */ |
||
| 35 | public static function startsWith($haystack, $needles) |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Determine if a given string contains a given substring. |
||
| 48 | * |
||
| 49 | * @param string $haystack |
||
| 50 | * @param string|array $needles |
||
| 51 | * @return bool |
||
| 52 | */ |
||
| 53 | public static function contains($haystack, $needles) |
||
| 62 | } |
||
| 63 | } |