TaskNameIsNotEmptySpecification   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A isSatisfiedBy() 0 4 1
1
<?php
2
3
namespace Todo\Domain\Specification;
4
5
/**
6
 * Class TaskNameIsNotEmptySpecification
7
 *
8
 * A specification describes that Task's name should not be empty
9
 *
10
 * @category None
11
 * @package  Todo\Domain\Specification
12
 * @author   Martin Pham <[email protected]>
13
 * @license  None http://
14
 * @link     None
15
 */
16
class TaskNameIsNotEmptySpecification
17
{
18
    /**
19
     * Check given name is empty or not, we want it not empty
20
     *
21
     * @param string $name Name
22
     *
23
     * @return bool
24
     */
25
    public function isSatisfiedBy(string $name)
26
    {
27
        return $name !== '';
28
    }
29
}
30