Library   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 108
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 29
c 1
b 0
f 0
dl 0
loc 108
ccs 25
cts 25
cp 1
rs 10
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getIsbn() 0 3 1
A setId() 0 5 1
A setIsbn() 0 5 1
A setTitle() 0 5 1
A setBookcover() 0 5 1
A getBookcover() 0 3 1
A getId() 0 3 1
A getTitle() 0 3 1
A getAuthor() 0 3 1
A setAuthor() 0 5 1
1
<?php
2
3
namespace App\Entity;
4
5
use App\Repository\LibraryRepository;
6
use Doctrine\ORM\Mapping as ORM;
7
8
/**
9
 * The Library class.
10
 */
11
#[ORM\Entity(repositoryClass: LibraryRepository::class)]
12
class Library
13
{
14
    #[ORM\Id]
15
    #[ORM\GeneratedValue]
16
    #[ORM\Column]
17
    private ?int $id = null;
18
19
    #[ORM\Column(length: 255)]
20
    private ?string $title = null;
21
22
    #[ORM\Column(length: 255)]
23
    private ?string $author = null;
24
25
    #[ORM\Column(length: 255)]
26
    private ?string $isbn = null;
27
28
    #[ORM\Column(length: 255)]
29
    private ?string $bookcover = null;
30
31
    /**
32
     * Get the id for the book.
33
     */
34 7
    public function getId(): ?int
35
    {
36 7
        return $this->id;
37
    }
38
39
    /**
40
     * Set the id of the book.
41
     */
42 7
    public function setId(int $id): static
43
    {
44 7
        $this->id = $id;
45
46 7
        return $this;
47
    }
48
49
    /**
50
     * Get the book title.
51
     */
52 7
    public function getTitle(): ?string
53
    {
54 7
        return $this->title;
55
    }
56
57
    /**
58
     * Set the book title.
59
     */
60 7
    public function setTitle(string $title): static
61
    {
62 7
        $this->title = $title;
63
64 7
        return $this;
65
    }
66
67
    /**
68
     * Get the author of the book.
69
     */
70 7
    public function getAuthor(): ?string
71
    {
72 7
        return $this->author;
73
    }
74
75
    /**
76
     * Set the author of the book.
77
     */
78 7
    public function setAuthor(string $author): static
79
    {
80 7
        $this->author = $author;
81
82 7
        return $this;
83
    }
84
85
    /**
86
     * Get the isbn of the book.
87
     */
88 7
    public function getIsbn(): ?string
89
    {
90 7
        return $this->isbn;
91
    }
92
93
    /**
94
     * Set the isbn of the book.
95
     */
96 7
    public function setIsbn(string $isbn): static
97
    {
98 7
        $this->isbn = $isbn;
99
100 7
        return $this;
101
    }
102
103
    /**
104
     * Get the bookcover.
105
     */
106 6
    public function getBookcover(): ?string
107
    {
108 6
        return $this->bookcover;
109
    }
110
111
    /**
112
     * Set the bookcover.
113
     */
114 7
    public function setBookcover(string $bookcover): static
115
    {
116 7
        $this->bookcover = $bookcover;
117
118 7
        return $this;
119
    }
120
}
121