Partner   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 63
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 4
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\KrsEntity;
18
19
use mrcnpdlk\MojePanstwo\Model\ModelAbstract;
20
21
22
class Partner extends ModelAbstract
23
{
24
    /**
25
     * @var string
26
     */
27
    public $nazwa;
28
    /**
29
     * @var string
30
     */
31
    public $data_urodzenia;
32
    /**
33
     * @var string
34
     */
35
    public $privacy_level;
36
    /**
37
     * @var integer
38
     */
39
    public $osoba_id;
40
    /**
41
     * @var integer
42
     */
43
    public $krs_id;
44
    /**
45
     * @var integer
46
     */
47
    public $id;
48
    /**
49
     * @var string
50
     */
51
    public $funkcja;
52
    /**
53
     * @var integer
54
     */
55
    public $udzialy_liczba;
56
    /**
57
     * @var float
58
     */
59
    public $udzialy_wartosc_jedn;
60
    /**
61
     * @var float
62
     */
63
    public $udzialy_wartosc;
64
65
66
    /**
67
     * Partner constructor.
68
     *
69
     * @param \stdClass|null $oData
70
     *
71
     * @throws \mrcnpdlk\MojePanstwo\Exception
72
     */
73
    public function __construct(\stdClass $oData = null)
74
    {
75
        parent::__construct($oData);
76
        if ($oData) {
77
            $this->osoba_id              = $this->convertToId($this->osoba_id);
78
            $this->krs_id                = $this->convertToId($this->krs_id);
79
            $this->id                    = $this->convertToId($this->id);
80
            $this->udzialy_wartosc_jedn = null === $this->udzialy_wartosc_jedn ? null : (float)$this->udzialy_wartosc_jedn;
81
            $this->udzialy_wartosc       = null === $this->udzialy_wartosc ? null : (float)$this->udzialy_wartosc;
82
        }
83
    }
84
}
85