Completed
Push — master ( d854a7...152012 )
by Jakub
02:52
created

ChatCharacter::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
ccs 1
cts 1
cp 1
cc 1
nc 1
nop 0
crap 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-read int|string $id
11
 * @property-read string $name
12
 */
13 1
class ChatCharacter {
14 1
  use \Nette\SmartObject;
15
  
16
  /** @var int|string */
17
  protected $id;
18
  /** @var string */
19
  protected $name;
20
  
21
  /**
22
   * @param int|string $id
23
   */
24
  public function __construct($id, string $name) {
25 1
    $this->id = $id;
26 1
    $this->name = $name;
27 1
  }
28
  
29
  /**
30
   * @return int|string
31
   */
32
  public function getId() {
33 1
    return $this->id;
34
  }
35
  
36
  /**
37
   * @return string
38
   */
39
  public function getName(): string {
40 1
    return $this->name;
41
  }
42
}
43
?>