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

ClientFactory::createPiwikClient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4286
cc 1
eloc 3
nc 1
nop 2
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