Completed
Push — master ( 0406c2...d58e57 )
by Christian
04:47
created

ClientFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A createPiwikClient() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the ni-ju-san CMS.
5
 *
6
 * (c) Christian Gripp <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Core23\PiwikBundle\Client;
13
14
use Core23\PiwikBundle\Connection\PiwikConnection;
15
16
class ClientFactory
17
{
18
    /**
19
     * @param string $host
20
     * @param string $token
21
     *
22
     * @return Client
23
     */
24
    public function createPiwikClient($host, $token)
25
    {
26
        $connection = new PiwikConnection($host);
27
28
        return new Client($connection, $token);
29
    }
30
}
31