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

AbstractUpdateTitle   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getTitle() 0 4 1
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