RequestLogDetail   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 39
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the zibios/sharep.
7
 *
8
 * (c) Zbigniew Ślązak
9
 */
10
11
namespace App\Entity\System;
12
13
use App\Entity\EntityInterface;
14
use App\Entity\Traits;
15
use Doctrine\ORM\Mapping as ORM;
16
use PascalDeVink\ShortUuid\ShortUuid;
17
use Symfony\Component\Validator\Constraints as Assert;
18
19
/**
20
 * @ORM\Entity()
21
 * @ORM\Table(name="system_request_log_details")
22
 */
23
class RequestLogDetail implements EntityInterface
24
{
25
    use Traits\PropertyIdGeneratedTrait;
26
27
    /**
28
     * @var string
29
     * @ORM\Column(name="path", type="text", nullable=false)
30
     */
31
    private $path;
32
33
    /**
34
     * @var string
35
     * @ORM\Column(name="meta", type="text", nullable=false)
36
     */
37
    private $meta;
38
39
    //-------------------------------------------------------------------------------------------
40
41
    /**
42
     * @var RequestLog
43
     * @ORM\ManyToOne(targetEntity="App\Entity\System\RequestLog", inversedBy="requestLogDetails")
44
     * @ORM\JoinColumn(name="request_log_id", referencedColumnName="id", nullable=false)
45
     *
46
     * @Assert\NotNull()
47
     */
48
    private $requestLog;
49
50
    //-------------------------------------------------------------------------------------------
51
52 16
    public function __construct(RequestLog $requestLog, string $path, string $meta)
53
    {
54 16
        $this->id = ShortUuid::uuid4();
55 16
        $this->requestLog = $requestLog;
56 16
        $this->path = $path;
57 16
        $this->meta = $meta;
58 16
    }
59
60
    //-------------------------------------------------------------------------------------------
61
}
62