JednostkaPodzialuTerytorialnego::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 10
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 9
nc 1
nop 1
dl 0
loc 12
ccs 10
cts 10
cp 1
crap 1
rs 9.9666
c 0
b 0
f 0
1
<?php
2
/**
3
 * TERYT-API
4
 *
5
 * Copyright (c) 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
 * @author Marcin Pudełek <[email protected]>
12
 */
13
14
/**
15
 * Created by Marcin Pudełek <[email protected]>
16
 * Date: 06.09.2017
17
 */
18
19
namespace mrcnpdlk\Teryt\ResponseModel\Territory;
20
21
/**
22
 * Class JednostkaPodzialuTerytorialnego
23
 */
24
class JednostkaPodzialuTerytorialnego extends AbstractResponseModel
25
{
26
    /**
27
     * JednostkaPodzialuTerytorialnego constructor.
28
     *
29
     * @param \stdClass $oData Obiekt zwrócony z TerytWS1
30
     *
31
     * @throws \mrcnpdlk\Teryt\Exception
32
     */
33 1
    public function __construct(\stdClass $oData)
34
    {
35 1
        $this->communeName     = $oData->GmiNazwa;
36 1
        $this->communeTypeName = $oData->GmiNazwaDodatkowa;
37 1
        $this->communeTypeId   = $oData->GmiRodzaj;
38 1
        $this->communeId       = $oData->GmiSymbol;
39 1
        $this->districtId      = $oData->PowSymbol;
40 1
        $this->districtName    = $oData->Powiat;
41 1
        $this->provinceId      = $oData->WojSymbol;
42 1
        $this->provinceName    = $oData->Wojewodztwo;
43
44 1
        parent::__construct();
45 1
    }
46
}
47