BlackholeClientFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
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 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getClient() 0 5 1
1
<?php
2
3
namespace Werkspot\Bundle\StatsdBundle\Service;
4
5
use Domnikl\Statsd\Connection\Blackhole;
6
use Werkspot\Bundle\StatsdBundle\Client\StatsdClient;
7
use Werkspot\Bundle\StatsdBundle\Client\StatsdClientInterface;
8
9
class BlackholeClientFactory implements StatsdClientFactoryInterface
10
{
11
    /**
12
     * @param string $namespace
13
     *
14
     * @return StatsdClientInterface
15
     */
16
    public function getClient($namespace)
17
    {
18
        $connection = new Blackhole();
19
        return new StatsdClient($connection, $namespace);
20
    }
21
}
22