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

Value_Bool_True::set()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 2
nc 2
nop 1
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