ExternalPost   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 37
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getUrl() 0 4 1
A getType() 0 4 1
1
<?php
2
3
namespace Matks\MarkdownBlogBundle\Blog;
4
5
class ExternalPost extends Post
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $url;
11
12
    /**
13
     * @param string   $contentFilepath
14
     * @param string   $name
15
     * @param string   $publishDate
16
     * @param string   $category
17
     * @param string[] $tags
18
     * @param string   $url
19
     */
20
    public function __construct($contentFilepath, $name, $publishDate, $category = null, $tags = [], $url)
21
    {
22
        parent::__construct($contentFilepath, $name, $publishDate, $category, $tags);
23
        $this->url = $url;
24
    }
25
26
    /**
27
     * @return string
28
     */
29
    public function getUrl()
30
    {
31
        return $this->url;
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function getType()
38
    {
39
        return self::TYPE_EXTERNAL;
40
    }
41
}
42