RandomCollector   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 22
c 0
b 0
f 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getIdentifier() 0 3 1
A collect() 0 7 1
1
<?php
2
3
namespace Startwind\Inventorio\Collector\Inventorio;
4
5
use Startwind\Inventorio\Collector\Collector;
6
7
/**
8
 * This collector returns details about this Inventorio client
9
 */
10
class RandomCollector implements Collector
11
{
12
    protected const COLLECTION_IDENTIFIER = '_InventorioRandom';
13
14
    /**
15
     * @inheritDoc
16
     */
17
    public function getIdentifier(): string
18
    {
19
        return self::COLLECTION_IDENTIFIER;
20
    }
21
22
    /**
23
     * @inheritDoc
24
     */
25
    public function collect(): array
26
    {
27
        return [
28
            'random' => [
29
                'level2' => rand()
30
            ],
31
            'level1' => rand()
32
        ];
33
    }
34
}
35