Passed
Push — master ( 9f17d2...e5ff49 )
by
unknown
03:30
created

Element   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 27
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getPosterPath() 0 7 2
A getBackdropPath() 0 7 2
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 6
    public function getPosterPath(): string
14
    {
15 6
        if (isset($this->data->poster_path)) {
16 3
            return $this->data->poster_path;
17
        }
18 3
        return '';
19
    }
20
21
    /**
22
     * Get backdrop
23
     */
24 4
    public function getBackdropPath(): string
25
    {
26 4
        if (isset($this->data->backdrop_path)) {
27 2
            return $this->data->backdrop_path;
28
        }
29 2
        return '';
30
    }
31
}
32