Pkd::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 1
Ratio 14.29 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 1
loc 7
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
crap 6
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 View Code Duplication
class Pkd extends ModelAbstract
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
22
{
23
    /**
24
     * @var integer
25
     */
26
    public $id;
27
    /**
28
     * Opis
29
     *
30
     * @var string
31
     */
32
    public $str;
33
    /**
34
     * @var boolean
35
     */
36
    public $przewazajaca;
37
38
39
    /**
40
     * Pkd constructor.
41
     *
42
     * @param \stdClass|null $oData
43
     *
44
     * @throws \mrcnpdlk\MojePanstwo\Exception
45
     */
46
    public function __construct(\stdClass $oData = null)
47
    {
48
        parent::__construct($oData);
49
        if ($oData) {
50
            $this->id = $this->convertToId($this->id);
51
        }
52
    }
53
}
54