Passed
Push — main ( 6040c1...3e8a32 )
by Jenny
04:53
created

Book::getTitle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace App\Entity;
4
5
use App\Repository\BookRepository;
6
use Doctrine\ORM\Mapping as ORM;
7
8
#[ORM\Entity(repositoryClass: BookRepository::class)]
9
class Book
10
{
11
    #[ORM\Id]
12
    #[ORM\GeneratedValue]
13
    #[ORM\Column]
14
    /** @phpstan-ignore-next-line */
15
    private ?int $id = null;
16
17
    #[ORM\Column(length: 255)]
18
    private ?string $title = null;
19
20
    #[ORM\Column(length: 255)]
21
    private ?string $isbn = null;
22
23
    #[ORM\Column(length: 255)]
24
    private ?string $author = null;
25
26
    #[ORM\Column(length: 255)]
27
    private ?string $image = null;
28
29 4
    public function getId(): ?int
30
    {
31 4
        return $this->id;
32
    }
33
34 6
    public function getTitle(): ?string
35
    {
36 6
        return $this->title;
37
    }
38
39 2
    public function setTitle(string $title): static
40
    {
41 2
        $this->title = $title;
42
43 2
        return $this;
44
    }
45
46 4
    public function getIsbn(): ?string
47
    {
48 4
        return $this->isbn;
49
    }
50
51 2
    public function setIsbn(string $isbn): static
52
    {
53 2
        $this->isbn = $isbn;
54
55 2
        return $this;
56
    }
57
58 5
    public function getAuthor(): ?string
59
    {
60 5
        return $this->author;
61
    }
62
63 2
    public function setAuthor(string $author): static
64
    {
65 2
        $this->author = $author;
66
67 2
        return $this;
68
    }
69
70 5
    public function getImage(): ?string
71
    {
72 5
        return $this->image;
73
    }
74
75 2
    public function setImage(string $image): static
76
    {
77 2
        $this->image = $image;
78
79 2
        return $this;
80
    }
81
}
82