Test Failed
Push — master ( b1cf76...d8fe36 )
by Julien
08:28
created

Audit::initialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php
2
/**
3
 * This file is part of the Zemit Framework.
4
 *
5
 * (c) Zemit Team <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE.txt
8
 * file that was distributed with this source code.
9
 */
10
11
declare(strict_types=1);
12
13
namespace Zemit\Models;
14
15
use Zemit\Models\Abstracts\AuditAbstract;
16
use Zemit\Models\Interfaces\AuditInterface;
17
18
/**
19
 * Class Audit
20
 *
21
 * This class represents a Audit object.
22
 * It extends the AuditAbstract class and implements the AuditInterface.
23
 */
24
class Audit extends AuditAbstract implements AuditInterface
25
{
26 5
    public function initialize(): void
27
    {
28 5
        parent::initialize();
29 5
        $this->addDefaultRelationships();
30
    }
31
32 3
    public function validation(): bool
33
    {
34 3
        $validator = $this->genericValidation();
35 3
        $this->addDefaultValidations($validator);
36 3
        return $this->validate($validator);
37
    }
38
}
39