Completed
Push — master ( cb16b1...c87003 )
by Ricardo
04:25 queued 25s
created

DailymotionServiceAdapterFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 16
ccs 3
cts 3
cp 1
rs 10

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: 30/08/2015
6
 * Time: 14:40.
7
 */
8
namespace RicardoFiorani\Adapter\Dailymotion\Factory;
9
10
use RicardoFiorani\Adapter\Dailymotion\DailymotionServiceAdapter;
11
use RicardoFiorani\Adapter\CallableServiceAdapterFactoryInterface;
12
use RicardoFiorani\Adapter\VideoAdapterInterface;
13
use RicardoFiorani\Renderer\EmbedRendererInterface;
14
15
class DailymotionServiceAdapterFactory implements CallableServiceAdapterFactoryInterface
16
{
17
    /**
18
     * @param string                 $url
19
     * @param string                 $pattern
20
     * @param EmbedRendererInterface $renderer
21
     *
22
     * @return VideoAdapterInterface
23
     */
24 10
    public function __invoke($url, $pattern, EmbedRendererInterface $renderer)
25
    {
26 10
        $dailyMotionServiceAdapter = new DailymotionServiceAdapter($url, $pattern, $renderer);
27
28 10
        return $dailyMotionServiceAdapter;
29
    }
30
}
31