Completed
Pull Request — develop (#184)
by Tony
23:35
created

Rewrite.php ➔ format_proc_descr()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 17
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 11
nc 2
nop 1
dl 0
loc 17
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
function format_proc_descr($descr)
0 ignored issues
show
Coding Style introduced by
As per coding-style, this function should be in camelCase.

CamelCase (...) is the practice of writing compound words or phrases such that
each word or abbreviation begins with a capital letter.

Learn more about camelCase.

Loading history...
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