CreateTokenCollectionCollection   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 1
dl 0
loc 37
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 2
A getColumnList() 0 6 1
A getPlaceholderList() 0 6 1
A getBindingsList() 0 10 2
1
<?php
2
3
namespace Hgraca\MicroDbal\Crud\QueryBuilder\Sql;
4
5
final class CreateTokenCollectionCollection
6
{
7
    /** @var CreateTokenCollection[] */
8
    private $collection;
9
10 5
    public function __construct(array $dataSetList)
11
    {
12 5
        foreach ($dataSetList as $dataSet) {
13 5
            $this->collection[] = new CreateTokenCollection($dataSet);
14
        };
15 5
    }
16
17 3
    public function getColumnList(): string
18
    {
19 3
        $createTokenCollection = reset($this->collection);
20
21 3
        return $createTokenCollection->getColumnList();
22
    }
23
24 3
    public function getPlaceholderList(): string
25
    {
26 3
        $createTokenCollection = reset($this->collection);
27
28 3
        return $createTokenCollection->getPlaceholderList();
29
    }
30
31 3
    public function getBindingsList(): array
32
    {
33 3
        $bindingsList = [];
34
35 3
        foreach ($this->collection as $createTokenCollection) {
36 3
            $bindingsList[] = $createTokenCollection->getBindingsList();
37
        }
38
39 3
        return $bindingsList;
40
    }
41
}
42