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

PlaylistComponentFactory   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 4
dl 0
loc 22
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A createSegment() 0 4 1
A createMediaPlaylist() 0 4 1
A createMasterPlaylist() 0 4 1
A createPlaylistBuffer() 0 4 1
1
<?php
2
3
namespace Chrisyue\PhpM3u8\Parser;
4
5
use Chrisyue\PhpM3u8\Model\MasterPlaylist;
6
use Chrisyue\PhpM3u8\Model\MediaPlaylist;
7
use Chrisyue\PhpM3u8\Model\MediaSegment;
8
9
class PlaylistComponentFactory
10
{
11
    public function createSegment()
12
    {
13
        return new MediaSegment();
14
    }
15
16
    public function createMediaPlaylist()
17
    {
18
        return new MediaPlaylist();
19
    }
20
21
    public function createMasterPlaylist()
22
    {
23
        return new MasterPlaylist();
24
    }
25
26
    public function createPlaylistBuffer()
27
    {
28
        return new PlaylistBuffer();
29
    }
30
}
31