Passed
Push — master ( 07fe92...9f0366 )
by oxidmod
06:46
created

AbstractCustomTypeCollection   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Oxidmod\TypedCollections\SimpleCollection;
5
6
use Oxidmod\TypedCollections\TypeCheckerFactory;
7
8
abstract class AbstractCustomTypeCollection extends AbstractCollection
9
{
10
    public function __construct(array $items = [])
11
    {
12
        parent::__construct(
13
            TypeCheckerFactory::customTypeChecker(static::getType()),
14
            $items
15
        );
16
    }
17
18
    abstract protected static function getType(): string;
19
}
20