Total Complexity | 2 |
Total Lines | 16 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
16 | trait ImplementsStringHelpers |
||
17 | { |
||
18 | public function makeTitle(string $slug): string |
||
19 | { |
||
20 | $alwaysLowercase = ['a', 'an', 'the', 'in', 'on', 'by', 'with', 'of', 'and', 'or', 'but']; |
||
21 | |||
22 | return ucfirst(str_ireplace( |
||
|
|||
23 | $alwaysLowercase, |
||
24 | $alwaysLowercase, |
||
25 | Str::headline($slug) |
||
26 | )); |
||
27 | } |
||
28 | |||
29 | public function markdown(string $text): HtmlString |
||
32 | } |
||
33 | } |
||
34 |