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

PlaylistBuffer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A copyToPlaylist() 0 8 2
1
<?php
2
3
namespace Chrisyue\PhpM3u8\Parser;
4
5
use Chrisyue\PhpM3u8\Model\AbstractPlaylist;
6
7
class PlaylistBuffer extends AbstractPlaylist implements PlaylistCopyableInterface
8
{
9
    public function copyToPlaylist(AbstractPlaylist $playlist)
10
    {
11
        $refClass = new \ReflectionClass(AbstractPlaylist::class);
12
        foreach ($refClass->getProperties() as $prop) {
13
            $prop->setAccessible(true);
14
            $prop->setValue($playlist, $prop->getValue($this));
15
        }
16
    }
17
}
18