Passed
Push — master ( f460bd...2d82a9 )
by Joppe
04:18
created

SeoTrait::initSeo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace JoppeDc\SyliusBetterSeoPlugin\Traits;
6
7
use JoppeDc\SyliusBetterSeoPlugin\Entity\ProductSeo;
8
9
trait SeoTrait
10
{
11
    /**
12
     * @var ProductSeo
13
     */
14
    protected $seo;
15
16
    /**
17
     * @return ProductSeo|null
18
     */
19
    public function getSeo(): ?ProductSeo
20
    {
21
        return $this->seo;
22
    }
23
24
    /**
25
     * @param ProductSeo|null $seo
26
     */
27
    public function setSeo(?ProductSeo $seo): void
28
    {
29
        $this->seo = $seo;
30
    }
31
32
    protected function initSeo(): void
33
    {
34
        $this->seo = new ProductSeo();
35
    }
36
}
37