Completed
Push — master ( ad0952...6b8fb6 )
by Alec
02:43
created

DefaultableName   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 9
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A default() 0 3 1
1
<?php
2
/**
3
 * User: alec
4
 * Date: 01.12.18
5
 * Time: 22:17
6
 */
7
8
namespace AlecRabbit\Traits;
9
10
11
trait DefaultableName
12
{
13
    /**
14
     * @param string|null $name
15
     * @return string
16
     */
17
    public function default(?string $name = null): string
18
    {
19
        return $name ?? 'default_name';
20
    }
21
}