Character::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 2
1
<?php
2
/**
3
 * xMDB-API
4
 *
5
 * Copyright © 2017 pudelek.org.pl
6
 *
7
 * @license MIT License (MIT)
8
 *
9
 * For the full copyright and license information, please view source file
10
 * that is bundled with this package in the file LICENSE
11
 *
12
 * @author  Marcin Pudełek <[email protected]>
13
 */
14
15
namespace mrcnpdlk\Xmdb\Model\Imdb;
16
17
/**
18
 * Class Character
19
 *
20
 * @package mrcnpdlk\Xmdb\Model\Imdb
21
 */
22
class Character
23
{
24
    /**
25
     * @var string
26
     */
27
    public $name;
28
    /**
29
     * @var \mrcnpdlk\Xmdb\Model\Imdb\Person
30
     */
31
    public $person;
32
33
    /**
34
     * Character constructor.
35
     *
36
     * @param string                                $name
37
     * @param \mrcnpdlk\Xmdb\Model\Imdb\Person|null $oPerson
38
     */
39
    public function __construct(string $name = null, Person $oPerson = null)
40
    {
41
        $this->name   = $name;
42
        $this->person = $oPerson;
43
    }
44
}
45