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

FacebookServiceAdapterFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
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\Facebook\Factory;
4
5
use RicardoFiorani\Adapter\Facebook\FacebookServiceAdapter;
6
use RicardoFiorani\Adapter\CallableServiceAdapterFactoryInterface;
7
use RicardoFiorani\Adapter\VideoAdapterInterface;
8
use RicardoFiorani\Renderer\EmbedRendererInterface;
9
10
class FacebookServiceAdapterFactory implements CallableServiceAdapterFactoryInterface
11
{
12
    public function __invoke(string $url, string $pattern, EmbedRendererInterface $renderer): VideoAdapterInterface
13
    {
14
        return new FacebookServiceAdapter($url, $pattern, $renderer);
15
    }
16
}
17