Completed
Push — master ( 198c07...76acb2 )
by Nico
02:10
created

TokenArray   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 19
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 4 1
A toArray() 0 11 2
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @license     http://opensource.org/licenses/mit-license.php MIT
7
 * @link        https://github.com/nicoSWD
8
 * @author      Nicolas Oelgart <[email protected]>
9
 */
10
namespace nicoSWD\Rules\Tokens;
11
12
final class TokenArray extends BaseToken
13
{
14 36
    public function getType(): int
15
    {
16 36
        return TokenType::VALUE;
17
    }
18
19 2
    public function toArray(): array
20
    {
21 2
        $items = [];
22
23 2
        foreach ($this->value as $value) {
24
            /** @var self $value */
25 2
            $items[] = $value->getValue();
26
        }
27
28 2
        return $items;
29
    }
30
}
31