Passed
Push — master ( 441f91...ac4843 )
by butschster
11:16
created

join_three_words()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 3
rs 10
1
<?php
2
3
function join_three_words($word1, $word2, $word3): string
4
{
5
    return $word1 . ' ' . $word2 . ' ' . $word3;
6
}
7
8
$a = 'Hello';
9
$b = 'world';
10
11
$c = 'John';
12
$d = 'Doe';
13
14
$e = 'John';
15
$f = 'Doe';
16
17
echo \sprintf(
18
    '%s %s',
19
    $a,
20
    join_three_words($b, $c, join_three_words($d, $e, $f))
21
); // Hello world John Doe John Doe
22