BenchmarkFactory::getBenchmark()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 3
crap 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