Meta   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 9
lcom 1
cbo 0
dl 0
loc 41
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getTitle() 0 4 1
A setTitle() 0 4 1
A getKeywords() 0 4 1
A setKeywords() 0 4 1
A getDescription() 0 4 1
A setDescription() 0 4 1
A isEmpty() 0 4 3
1
<?php
2
/*
3
 * WellCommerce Open-Source E-Commerce Platform
4
 * 
5
 * This file is part of the WellCommerce package.
6
 *
7
 * (c) Adam Piotrowski <[email protected]>
8
 * 
9
 * For the full copyright and license information,
10
 * please view the LICENSE file that was distributed with this source code.
11
 */
12
13
namespace WellCommerce\Bundle\AppBundle\Entity;
14
15
/**
16
 * Class Meta
17
 *
18
 * @author  Adam Piotrowski <[email protected]>
19
 */
20
class Meta
21
{
22
    protected $title       = '';
23
    protected $keywords    = '';
24
    protected $description = '';
25
    
26
    public function getTitle(): string
27
    {
28
        return $this->title;
29
    }
30
    
31
    public function setTitle(string $title)
32
    {
33
        $this->title = $title;
34
    }
35
    
36
    public function getKeywords(): string
37
    {
38
        return $this->keywords;
39
    }
40
    
41
    public function setKeywords(string $keywords)
42
    {
43
        $this->keywords = $keywords;
44
    }
45
    
46
    public function getDescription(): string
47
    {
48
        return $this->description;
49
    }
50
    
51
    public function setDescription(string $description)
52
    {
53
        $this->description = $description;
54
    }
55
    
56
    public function isEmpty(): bool
57
    {
58
        return mb_strlen($this->title) === 0 && mb_strlen($this->description) === 0 && mb_strlen($this->keywords) === 0;
59
    }
60
}
61