BenchmarkFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getBenchmark() 0 4 1
1
<?php
2
/**
3
 * @author @fabfuel <[email protected]>
4
 * @created 13.11.14, 17:26 
5
 */
6
namespace Fabfuel\Prophiler\Benchmark;
7
8
class BenchmarkFactory
9
{
10
    /**
11
     * @param string $name Unique identifier like e.g. Class::Method (\Foobar\MyClass::doSomething)
12
     * @param array $metadata Additional metadata
13
     * @param string $component Name of the component which triggered the benchmark, e.g. "App", "Database"
14
     * @return BenchmarkInterface
15
     */
16 1
    public static function getBenchmark($name, $metadata = [], $component = null)
17
    {
18 1
        return new Benchmark($name, $metadata, $component);
19
    }
20
}
21