| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 46 | public function short() |
||
| 47 | { |
||
| 48 | $shortened_parts = []; |
||
| 49 | foreach ($this->segments as $part) { |
||
| 50 | $string = S::create($part); |
||
| 51 | |||
| 52 | if ($string->contains('.')) { |
||
| 53 | $shortened_parts[] = $string; |
||
| 54 | } else { |
||
| 55 | $shortened_parts[] = $string->truncate(2, '.'); |
||
| 56 | } |
||
| 57 | } |
||
| 58 | |||
| 59 | return implode(' ', $shortened_parts); |
||
| 60 | } |
||
| 61 | } |