Completed
Pull Request — master (#8)
by Ricardo
01:45
created

VimeoServiceAdapterFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 2
1
<?php declare(strict_types=1);
2
3
namespace RicardoFiorani\Adapter\Vimeo\Factory;
4
5
use RicardoFiorani\Adapter\CallableServiceAdapterFactoryInterface;
6
use RicardoFiorani\Adapter\VideoAdapterInterface;
7
use RicardoFiorani\Adapter\Vimeo\VimeoServiceAdapter;
8
use RicardoFiorani\Renderer\EmbedRendererInterface;
9
10
class VimeoServiceAdapterFactory implements CallableServiceAdapterFactoryInterface
11
{
12
    public function __invoke(string $url, string $pattern, EmbedRendererInterface $renderer): VideoAdapterInterface
13
    {
14
        $adapter = new VimeoServiceAdapter($url, $pattern, $renderer);
15
16
        return $adapter;
17
    }
18
}
19