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

AbstractPlaylist::setVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 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