Passed
Push — master ( 928313...9b22c0 )
by Damien
04:01
created

Auditable::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace DH\Auditor\Provider\Doctrine\Auditing\Annotation;
4
5
use Attribute;
6
use Doctrine\Common\Annotations\Annotation;
7
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
8
9
/**
10
 * @Annotation
11
 * @NamedArgumentConstructor()
12
 * @Target("CLASS")
13
 * @Attributes({
14
 *     @Attribute("enabled", required=false, type="bool"),
15
 * })
16
 */
17
#[Attribute(Attribute::TARGET_CLASS)]
18
final class Auditable
19
{
20
    /**
21
     * @var bool
22
     */
23
    public $enabled = true;
24
25
    public function __construct(bool $enabled = true)
26
    {
27
        $this->enabled = $enabled;
28
    }
29
}
30