Completed
Push — master ( c87003...3c98f3 )
by Ricardo
22s
created

YoutubeServiceAdapterFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 15
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Ricardo Fiorani
5
 * Date: 29/08/2015
6
 * Time: 19:24.
7
 */
8
namespace RicardoFiorani\Adapter\Youtube\Factory;
9
10
use RicardoFiorani\Adapter\CallableServiceAdapterFactoryInterface;
11
use RicardoFiorani\Adapter\Youtube\YoutubeServiceAdapter;
12
use RicardoFiorani\Renderer\EmbedRendererInterface;
13
14
class YoutubeServiceAdapterFactory implements CallableServiceAdapterFactoryInterface
15
{
16
    /**
17
     * @param string $url
18
     * @param string $pattern
19
     *
20
     * @return YoutubeServiceAdapter
21
     */
22
    public function __invoke($url, $pattern, EmbedRendererInterface $renderer)
23
    {
24
        $adapter = new YoutubeServiceAdapter($url, $pattern, $renderer);
25
26
        return $adapter;
27
    }
28
}
29