Completed
Push — master ( bc5ed0...726c0c )
by Simonas
6s
created

SeoAwareTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 5
Bugs 0 Features 1
Metric Value
c 5
b 0
f 1
dl 0
loc 25
wmc 2
lcom 0
cbo 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getUrl() 0 4 1
A setUrl() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the ONGR package.
5
 *
6
 * (c) NFQ Technologies UAB <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace ONGR\RouterBundle\Document;
13
14
use ONGR\ElasticsearchBundle\Annotation as ES;
15
16
/**
17
 * Trait that adds SEO fields to document.
18
 */
19
trait SeoAwareTrait
20
{
21
    /**
22
     * @var string URL.
23
     *
24
     * @ES\Property(name="url", type="string", options={"analyzer"="urlAnalyzer"})
25
     */
26
    private $url;
27
28
    /**
29
     * @return string
30
     */
31
    public function getUrl()
32
    {
33
        return $this->url;
34
    }
35
36
    /**
37
     * @param $url
38
     */
39
    public function setUrl($url)
40
    {
41
        $this->url = $url;
42
    }
43
}
44