Completed
Push — master ( 4783ce...1821eb )
by Dennis
03:38
created

GraphRandomItemAccessBench   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A benchRandomItemAccess() 0 4 1
1
<?php
2
3
/**
4
 * (c) Dennis Meckel
5
 *
6
 * For the full copyright and license information,
7
 * please view the LICENSE file that was distributed with this source code.
8
 */
9
10
namespace Rayne\wz2008\Graph\Benchmark\Graph;
11
12
use Rayne\wz2008\Graph\Benchmark\RandomItemAccessCase;
13
use Rayne\wz2008\Graph\Factory\WzClassificationFactory;
14
use Rayne\wz2008\Graph\WzClassificationInterface;
15
16
class GraphRandomItemAccessBench extends RandomItemAccessCase
17
{
18
    /**
19
     * @var WzClassificationInterface
20
     */
21
    public $graph;
22
23
    /**
24
     *
25
     */
26
    public function __construct()
27
    {
28
        $this->graph = WzClassificationFactory::build();
29
    }
30
31
    /**
32
     * @inheritdoc
33
     */
34
    public function benchRandomItemAccess($params)
35
    {
36
        $this->assertSame($params['child'], $this->graph->get('id'));
37
    }
38
}
39