Passed
Push — master ( e89c90...b07112 )
by Bas
03:34
created

PublicatieReference::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
c 1
b 0
f 1
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace DMT\Insolvency\Model;
4
5
use DMT\Insolvency\Client;
6
use DMT\Insolvency\Soap\Response\GetCaseResponse;
7
use DMT\Insolvency\Soap\Response\GetCaseWithReportsResponse;
8
use JMS\Serializer\Annotation as JMS;
9
10
/**
11
 * Class PublicatieReference
12
 *
13
 * @JMS\XmlNamespace("http://www.rechtspraak.nl/namespaces/cir01")
14
 * @JMS\XmlRoot("publicatieKenmerk", namespace="http://www.rechtspraak.nl/namespaces/inspubber01")
0 ignored issues
show
Coding Style introduced by
Tag value for @JMS\XmlRoot("publicatieKenmerk", tag indented incorrectly; expected 31 spaces but found 1
Loading history...
15
 */
0 ignored issues
show
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
Coding Style introduced by
Missing @author tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
16
class PublicatieReference implements ConstructWithClientInterface
17
{
18
    use LazyLoadingPropertyTrait;
19
20
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
21
     * @JMS\Type("string")
22
     * @JMS\XmlValue()
23
     *
24
     * @var string $publicatieKenmerk
25
     */
26
    public $publicatieKenmerk;
27
28
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
29
     * @JMS\ReadOnlyProperty()
30
     *
31
     * @var Insolvente $insolvente
32
     */
33
    private $insolvente;
0 ignored issues
show
Coding Style introduced by
Private member variable "insolvente" must be prefixed with an underscore
Loading history...
34
35 5
    public function __construct(Client $client)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function __construct()
Loading history...
36
    {
37
        $this->insolvente = function () use ($client) {
0 ignored issues
show
Documentation Bug introduced by
It seems like function(...) { /* ... */ } of type callable is incompatible with the declared type DMT\Insolvency\Model\Insolvente of property $insolvente.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
38 5
            $case = $client->getCaseWithReports($this->publicatieKenmerk);
39
40 5
            return $case->result->inspubWebserviceInsolvente->insolvente;
41
        };
42 5
    }
43
44
45
}
46