Province   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 27
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
1
<?php
2
/**
3
 * MOJEPANSTWO-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
declare (strict_types=1);
16
17
namespace mrcnpdlk\MojePanstwo\Model\Address;
18
19
use mrcnpdlk\MojePanstwo\Model\ModelAbstract;
20
21
/**
22
 * Class Province
23
 *
24
 * @package mrcnpdlk\MojePanstwo\Model
25
 */
26
class Province extends ModelAbstract
27
{
28
    const CONTEXT = 'wojewodztwa';
29
    /**
30
     * @var integer
31
     */
32
    public $id;
33
    /**
34
     * @var string
35
     */
36
    public $nazwa;
37
38
    /**
39
     * Province constructor.
40
     *
41
     * @param \stdClass|null $oData
42
     *
43
     * @throws \mrcnpdlk\MojePanstwo\Exception
44
     */
45 1
    public function __construct(\stdClass $oData = null)
46
    {
47 1
        parent::__construct($oData);
48 1
        if ($oData) {
49 1
            $this->id = $this->convertToId($this->id);
50
        }
51 1
    }
52
}
53