| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 18 |
| CRAP Score | 1 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | 74 | public function regularize() |
|
| 15 | { |
||
| 16 | 74 | return $this |
|
| 17 | 74 | ->toHalfCase() |
|
| 18 | 74 | ->replace('/^\d+/', '') |
|
| 19 | 74 | ->replace([ |
|
| 20 | 74 | ' ' => '', |
|
| 21 | 74 | ',' => '', |
|
| 22 | 74 | '~' => '之', |
|
| 23 | 74 | '-' => '之', |
|
| 24 | 74 | '台灣' => '臺灣', |
|
| 25 | 74 | '台北' => '臺北', |
|
| 26 | 74 | '台中' => '臺中', |
|
| 27 | 74 | '台南' => '臺南', |
|
| 28 | 74 | '台東' => '臺東', |
|
| 29 | 74 | '釣魚台' => '釣魚臺', |
|
| 30 | 74 | '台西鄉' => '臺西鄉', |
|
| 31 | 74 | '霧台鄉' => '霧臺鄉', |
|
| 32 | 74 | ]); |
|
| 33 | } |
||
| 34 | |||
| 102 |