RodzajMiejscowosci::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
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.
16
 * Date: 06.09.2017
17
 * Time: 21:56
18
 */
19
20
namespace mrcnpdlk\Teryt\ResponseModel\Dictionary;
21
22
/**
23
 * Class RodzajMiejscowosci
24
 */
25
class RodzajMiejscowosci
26
{
27
    /**
28
     * Identyfikator typu miejscowości
29
     *
30
     * @var string
31
     */
32
    public $id;
33
    /**
34
     * Nazwa typu
35
     *
36
     * @var string
37
     */
38
    public $name;
39
    /**
40
     * Opis
41
     *
42
     * @var string
43
     */
44
    public $desc;
45
46
    /**
47
     * RodzajMiejscowosci constructor.
48
     *
49
     * @param \stdClass $oData Obiekt zwrócony z TerytWS1
50
     */
51 1
    public function __construct(\stdClass $oData)
52
    {
53 1
        $this->id   = $oData->Symbol;
54 1
        $this->name = $oData->Nazwa;
55 1
        $this->desc = $oData->Opis;
56 1
    }
57
}
58