Passed
Push — master ( b28623...b691b7 )
by Sebastian
04:23
created

Value_Bool_True   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A set() 0 8 2
1
<?php
2
/**
3
 * File containing the {@see AppUtils\Value_Bool_True} class.
4
 *
5
 * @package Application Utils
6
 * @subpackage Values
7
 * @see AppUtils\Value_Bool_True
8
 */
9
10
declare(strict_types=1);
11
12
namespace AppUtils;
13
14
/**
15
 * Sticky true-based boolean value: starts out as false, 
16
 * and if it is set to true, cannot be set to false again 
17
 * afterwards.
18
 *
19
 * @package Application Utils
20
 * @subpackage Values
21
 * @author Sebastian Mordziol <[email protected]>
22
 */
23
class Value_Bool_True extends Value_Bool
24
{
25
    public function set(bool $value) : Value_Bool
26
    {
27
        if($value === true)
28
        {
29
            parent::set($value);
30
        }
31
        
32
        return $this;
33
    }
34
}
35