Completed
Push — master ( 38f0f9...04f747 )
by Carsten
04:35
created

Film::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
ccs 6
cts 6
cp 1
rs 9.6666
cc 1
eloc 6
nc 1
nop 0
crap 1
1
<?php
2
namespace FilmTools\Films;
3
4
5
class Film extends FilmAbstract implements FilmInterface
6
{
7
8
    /**
9
     * @return string
10
     */
11 64
    public function __toString()
12
    {
13
        $info = [
14 64
            $this->getManufacturer(),
15 64
            $this->getName(),
16 64
            $this->getAsa()
17 16
        ];
18 64
        return trim(implode(" ", array_filter($info)));
19
    }
20
21
22
    /**
23
     * @param string $name
24
     */
25 64
    public function setName( $name )
26
    {
27 64
        $this->name = $name;
28 64
        return $this;
29
    }
30
31
32
    /**
33
     * @param string $manufacturer
34
     */
35 64
    public function setManufacturer( $manufacturer )
36
    {
37 64
        $this->manufacturer = $manufacturer;
38 64
        return $this;
39
    }
40
41
    /**
42
     * @param string $asa
43
     */
44 48
    public function setAsa( $asa )
45
    {
46 48
        $this->asa = $asa;
0 ignored issues
show
Documentation Bug introduced by
It seems like $asa of type string is incompatible with the declared type integer|null of property $asa.

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...
47 48
        return $this;
48
    }
49
50
51
}
52