Passed
Push — master ( e97712...5fe6af )
by Yuichi
02:30
created

string.php ➔ strcat()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 14
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 3

Importance

Changes 2
Bugs 0 Features 1
Metric Value
cc 3
eloc 9
c 2
b 0
f 1
nc 3
nop 0
dl 0
loc 14
ccs 9
cts 9
cp 1
crap 3
rs 9.4285
1
<?php
2
3 1
if ( ! function_exists('strcat') ) {
4
    function strcat()
5
    {
6 1
        $args = func_get_args();
7 1
        $str = '';
8
9 1
        foreach ( $args as $rec ) {
10 1
            if ( $rec ) {
11 1
                $str .= $rec;
12 1
            } else {
13 1
                return null;
14
            }
15 1
        }
16 1
        return $str;
17
    }
18
}
19