UlicaDrzewo::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 8
ccs 0
cts 6
cp 0
crap 2
rs 10
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 UlicaDrzewo
23
 */
24
class UlicaDrzewo extends Ulica
25
{
26
    /**
27
     * 7 znakowy identyfikator miejscowości podstawowej
28
     *
29
     * @var string
30
     */
31
    public $cityParentId;
32
    /**
33
     * Zwiera nazwę ulicy w podziale na pola z uwzględnieniem słów kluczowych
34
     *
35
     * @var string
36
     */
37
    public $streetName1;
38
    /**
39
     * Zwiera nazwę ulicy w podziale na pola z uwzględnieniem słów kluczowych
40
     *
41
     * @var string
42
     */
43
    public $streetName2;
44
    /**
45
     * wyznacza miejsce podziału pełnej nazwy ulicy na nazwa1 i nazwa2
46
     *
47
     * @var int
48
     */
49
    public $indexKey;
50
51
    /**
52
     * UlicaDrzewo constructor.
53
     *
54
     * @param \stdClass $oData Obiekt zwrócony z TerytWS1
55
     *
56
     * @throws \mrcnpdlk\Teryt\Exception
57
     */
58
    public function __construct(\stdClass $oData)
59
    {
60
        parent::__construct($oData);
61
62
        $this->cityParentId = $oData->IdentyfikatorMiejscowosciPodstawowej;
63
        $this->streetName1  = $oData->Nazwa1;
64
        $this->streetName2  = $oData->Nazwa2;
65
        $this->indexKey     = $oData->IndeksKlucza;
66
    }
67
}
68