Chat::setId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zored\Telegram\Entity;
6
7
use JMS\Serializer\Annotation as Serializer;
8
use Zored\Telegram\Entity\General\AbstractEntity;
9
10
class Chat extends AbstractEntity
11
{
12
    private const EXAMPLE = <<<JSON
13
{
14
  "_": "channel",
15
  "creator": false,
16
  "left": false,
17
  "editor": false,
18
  "broadcast": false,
19
  "verified": false,
20
  "megagroup": true,
21
  "restricted": false,
22
  "democracy": true,
23
  "signatures": false,
24
  "min": false,
25
  "id": 1,
26
  "access_hash": -1,
27
  "title": "Puma@CI&CD",
28
  "photo": {
29
    "_": "chatPhoto",
30
    "photo_small": {
31
      "_": "fileLocation",
32
      "dc_id": 2,
33
      "volume_id": 1,
34
      "local_id": 1,
35
      "secret": -1
36
    },
37
    "photo_big": {
38
      "_": "fileLocation",
39
      "dc_id": 2,
40
      "volume_id": 1,
41
      "local_id": 1,
42
      "secret": -1
43
    }
44
  },
45
  "date": 1503318777,
46
  "version": 0
47
}
48
JSON;
49
50
    /**
51
     * @Serializer\Type("integer")
52
     *
53
     * @var int
54
     */
55
    private $id;
56
57
    /**
58
     * @Serializer\Type("string")
59
     *
60
     * @var string
61
     */
62
    private $title;
63
64
    public function getId(): int
65
    {
66
        return $this->id;
67
    }
68
69
    public function getTitle(): string
70
    {
71
        return $this->title;
72
    }
73
74
    public function setId(int $id): self
75
    {
76
        $this->id = $id;
77
78
        return $this;
79
    }
80
81
    public function setTitle(string $title): self
82
    {
83
        $this->title = $title;
84
85
        return $this;
86
    }
87
}
88