Completed
Pull Request — develop (#27)
by Chris
13:09
created

AbstractPlaylist   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 28
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setVersion() 0 7 1
A getVersion() 0 4 1
1
<?php
2
3
namespace Chrisyue\PhpM3u8\Model;
4
5
use Chrisyue\PhpM3u8\Model\Annotation\Tag;
6
use Stringy\Stringy as S;
7
use Chrisyue\PhpM3u8\Model\Context;
8
9
abstract class AbstractPlaylist
10
{
11
    /**
12
     * @Tag
13
     */
14
    private $version;
15
16
    /**
17
     * @param int $version
18
     *
19
     * @return self
20
     */
21
    public function setVersion($version)
22
    {
23
        $this->version = $version;
24
        Context::$params['version'] = $version;
25
26
        return $this;
27
    }
28
29
    /**
30
     * @return int
31
     */
32
    public function getVersion()
33
    {
34
        return $this->version;
35
    }
36
}
37