Completed
Push — master ( 65ec1d...8a8a83 )
by Jakub
05:39
created

ChatCharacter::setId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 2
rs 10
cc 1
nc 1
nop 1
1
<?php
2
declare(strict_types=1);
3
4
namespace HeroesofAbenez\Chat;
5
6
/**
7
 * ChatCharacter
8
 *
9
 * @author Jakub Konečný
10
 * @property int|string $id
11
 * @property string $name
12
 */
13
class ChatCharacter {
14
  use \Nette\SmartObject;
15
  
16
  /** @var int|string */
17
  protected $id;
18
  /** @var string */
19
  protected string $name;
20
  
21
  /**
22
   * @param int|string $id
23
   */
24
  public function __construct($id, string $name) {
25
    $this->id = $id;
26
    $this->name = $name;
27
  }
28
  
29
  /**
30
   * @return int|string
31
   */
32
  public function getId() {
33
    return $this->id;
34
  }
35
36
  /**
37
   * @param int|string $id
38
   */
39
  protected function setId($id): void {
40
    $this->id = $id;
41
  }
42
  
43
  /**
44
   * @return string
45
   */
46
  public function getName(): string {
47
    return $this->name;
48
  }
49
50
  protected function setName(string $name): void {
51
    $this->name = $name;
52
  }
53
}
54
?>