| Total Complexity | 4 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 5 | ||
| Bugs | 2 | Features | 0 |
| 1 | <?php |
||
| 17 | trait ImplementsStringHelpers |
||
| 18 | { |
||
| 19 | public function makeTitle(string $value): string |
||
| 20 | { |
||
| 21 | $alwaysLowercase = ['a', 'an', 'the', 'in', 'on', 'by', 'with', 'of', 'and', 'or', 'but']; |
||
| 22 | |||
| 23 | return ucfirst(str_ireplace( |
||
|
|
|||
| 24 | $alwaysLowercase, |
||
| 25 | $alwaysLowercase, |
||
| 26 | Str::headline($value) |
||
| 27 | )); |
||
| 28 | } |
||
| 29 | |||
| 30 | public function normalizeNewlines(string $string): string |
||
| 31 | { |
||
| 32 | return str_replace(["\r\n"], "\n", $string); |
||
| 33 | } |
||
| 34 | |||
| 35 | public function markdown(string $text, bool $normalizeIndentation = false): HtmlString |
||
| 42 | } |
||
| 43 | } |
||
| 44 |