Completed
Pull Request — develop (#27)
by Chris
01:52
created

AbstractTransformer::doTransform()

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
nc 1
1
<?php
2
3
namespace Chrisyue\PhpM3u8\Transformer;
4
5
abstract class AbstractTransformer implements TransformerInterface
6
{
7
    public function transform($origin)
8
    {
9
        if (!$this->supports($origin)) {
10
            trigger_error(sprintf('Non-supported type for transformation'), E_USER_WARNING);
11
12
            return $origin;
13
        }
14
15
        return $this->doTransform($origin);
16
    }
17
18
    abstract protected function doTransform($origin);
19
}
20