Completed
Push — master ( 74d8cf...88d0d9 )
by Marcin
02:58
created

JednostkaPodzialuTerytorialnego::__construct()   A

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.4285
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
 *
12
 * @author Marcin Pudełek <[email protected]>
13
 *
14
 */
15
16
/**
17
 * Created by Marcin Pudełek <[email protected]>
18
 * Date: 06.09.2017
19
 */
20
21
namespace mrcnpdlk\Teryt\ResponseModel\Territory;
22
23
/**
24
 * Class JednostkaPodzialuTerytorialnego
25
 *
26
 * @package mrcnpdlk\Teryt\ResponseModel\Territory
27
 */
28
class JednostkaPodzialuTerytorialnego extends AbstractResponseModel
29
{
30
    /**
31
     * JednostkaPodzialuTerytorialnego constructor.
32
     *
33
     * @param \stdClass $oData Obiekt zwrócony z TerytWS1
34
     */
35 1
    public function __construct(\stdClass $oData)
36
    {
37 1
        $this->communeName     = $oData->GmiNazwa;
38 1
        $this->communeTypeName = $oData->GmiNazwaDodatkowa;
39 1
        $this->communeTypeId   = $oData->GmiRodzaj;
40 1
        $this->communeId       = $oData->GmiSymbol;
41 1
        $this->districtId      = $oData->PowSymbol;
42 1
        $this->districtName    = $oData->Powiat;
43 1
        $this->provinceId      = $oData->WojSymbol;
44 1
        $this->provinceName    = $oData->Wojewodztwo;
45
46 1
        parent::__construct();
47 1
    }
48
}
49