Test Failed
Pull Request — master (#17)
by
unknown
03:56
created

Element::getBackdrop()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace vfalies\tmdb\Abstracts;
4
5
abstract class Element
6
{
7
    protected $data = null;
8
    protected $conf = null;
9
10
    /**
11
     * Get poster path
12
     */
13
    public function getPosterPath(): string
14
    {
15 21
        if (isset($this->data->poster_path)) {
16
            return $this->data->poster_path;
17 21
        }
18
        return '';
19
    }
20
21
    /**
22
     * Get backdrop
23
     */
24
    public function getBackdropPath(): string
25 21
    {
26
        if (isset($this->data->backdrop_path)) {
27 21
            return $this->data->backdrop_path;
28
        }
29
        return '';
30
    }
31
}
32