| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 3 | function format_proc_descr($descr) |
||
|
|
|||
| 4 | { |
||
| 5 | $bad_descr = array( |
||
| 6 | '/GenuineIntel:/' => '', |
||
| 7 | '/AuthenticAMD:/' => '', |
||
| 8 | '/Intel(R)/' => '', |
||
| 9 | '/CPU/' => '', |
||
| 10 | '/(R)/' => '', |
||
| 11 | '/ /' => ' ', |
||
| 12 | ); |
||
| 13 | |||
| 14 | foreach ($bad_descr as $find => $replace) { |
||
| 15 | $descr = preg_replace($find, $replace, $descr); |
||
| 16 | } |
||
| 17 | |||
| 18 | return $descr; |
||
| 19 | } |
||
| 20 | |||
| 21 |
Learn more about camelCase.