Completed
Pull Request — master (#321)
by
unknown
04:23
created

AbstractUpdateTitle::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 3
1
<?php
2
3
namespace CultuurNet\UDB3\Offer\Commands;
4
5
use CultuurNet\UDB3\Language;
6
use ValueObjects\StringLiteral\StringLiteral;
7
8
abstract class AbstractUpdateTitle extends AbstractTranslatePropertyCommand
9
{
10
    /**
11
     * @var string
12
     */
13
    protected $title;
14
15
    /**
16
     * @param string $itemId
17
     * @param Language $language
18
     * @param StringLiteral $title
19
     */
20
    public function __construct($itemId, Language $language, StringLiteral $title)
21
    {
22
        parent::__construct($itemId, $language);
23
        $this->title = $title;
0 ignored issues
show
Documentation Bug introduced by
It seems like $title of type object<ValueObjects\StringLiteral\StringLiteral> is incompatible with the declared type string of property $title.

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...
24
    }
25
26
    /**
27
     * @return StringLiteral
28
     */
29
    public function getTitle()
30
    {
31
        return $this->title;
32
    }
33
}
34