Passed
Push — master ( a73c0f...44755a )
by Julien
03:04
created

WithIdInt   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 33
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setId() 0 3 1
A setTitle() 0 3 1
A getId() 0 3 1
A getTitle() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Mapado\RestClientSdk\Tests\Model\Issue90;
6
7
use Mapado\RestClientSdk\Mapping\Annotations as Rest;
8
9
/**
10
 * @Rest\Entity(key="plop")
11
 */
12
class WithIdInt
13
{
14
    /**
15
     * @var int
16
     *
17
     * @Rest\Id
18
     * @Rest\Attribute(name="id", type="int")
19
     */
20
    private $id;
21
22
    /**
23
     * @Rest\Attribute(name="title", type="string")
24
     */
25
    private $title;
26
27
    public function setId(int $id): void
28
    {
29
        $this->id = $id;
30
    }
31
32
    public function getId(): int
33
    {
34
        return $this->id;
35
    }
36
37
    public function setTitle($title)
38
    {
39
        $this->title = $title;
40
    }
41
42
    public function getTitle()
43
    {
44
        return $this->title;
45
    }
46
}
47