Passed
Push — master ( 777bb3...b79720 )
by
unknown
22:29 queued 11:09
created

SearchEngineRef::getResourceNode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\CoreBundle\Entity;
8
9
use Doctrine\ORM\Mapping as ORM;
10
11
#[ORM\Table(name: 'search_engine_ref')]
12
#[ORM\Entity]
13
class SearchEngineRef
14
{
15
    #[ORM\ManyToOne(targetEntity: ResourceNode::class)]
16
    #[ORM\JoinColumn(name: 'resource_node_id', referencedColumnName: 'id', nullable: true, onDelete: 'CASCADE')]
17
    private ?ResourceNode $resourceNode = null;
18
19
    #[ORM\Column(name: 'search_did', type: 'integer', nullable: false)]
20
    private int $searchDid;
21
22
    #[ORM\Id]
23
    #[ORM\Column(name: 'id', type: 'integer')]
24
    #[ORM\GeneratedValue(strategy: 'IDENTITY')]
25
    private ?int $id = null;
26
27
    public function getId(): ?int
28
    {
29
        return $this->id;
30
    }
31
32
    public function getResourceNode(): ?ResourceNode
33
    {
34
        return $this->resourceNode;
35
    }
36
37
    public function setResourceNode(?ResourceNode $resourceNode): self
38
    {
39
        $this->resourceNode = $resourceNode;
40
41
        return $this;
42
    }
43
44
    public function getSearchDid(): int
45
    {
46
        return $this->searchDid;
47
    }
48
49
    public function setSearchDid(int $searchDid): self
50
    {
51
        $this->searchDid = $searchDid;
52
53
        return $this;
54
    }
55
}
56