Picture   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 35
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getPicture() 0 9 2
A setPicture() 0 5 1
1
<?php
2
/*
3
 * This file is part of the La Voz Feed Generator package.
4
 *
5
 * (c) Zephia <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Zephia\LaVozFeed\Entity;
12
use Zephia\LaVozFeed\Exception\LogicException;
13
14
/**
15
 * Class Picture
16
 *
17
 * @package Zephia\LaVozFeed\Entity
18
 * @author  Mauro Moreno <[email protected]>
19
 */
20
class Picture extends Entity
21
{
22
    /**
23
     * @var string
24
     */
25
    private $picture = '';
26
27
    /**
28
     * Get Picture
29
     *
30
     * @return string
31
     */
32 4
    public function getPicture()
33
    {
34 4
        if (empty($this->picture)) {
35 1
            throw new LogicException(
36 1
                sprintf(self::ERROR_MISSING_ATTRIBUTE_FORMAT, 'picture')
37 1
            );
38
        }
39 3
        return $this->picture;
40
    }
41
42
    /**
43
     * Set Picture
44
     *
45
     * @param string $picture
46
     *
47
     * @return Picture
48
     */
49 3
    public function setPicture($picture)
50
    {
51 3
        $this->picture = $picture;
52 3
        return $this;
53
    }
54
}
55