BooleanCollection   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A offsetGet() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Oxidmod\TypedCollections\SimpleCollection;
6
7
use Oxidmod\TypedCollections\TypeCheckerFactory;
8
9
/**
10
 * @method offsetSet($offset, bool $value) : void
11
 */
12
class BooleanCollection extends AbstractCollection
13
{
14
    public function __construct(array $items = [])
15
    {
16
        parent::__construct(TypeCheckerFactory::booleanChecker(), $items);
17
    }
18
19
    public function offsetGet($offset): ?bool
20
    {
21
        return $this->items[$offset] ?? null;
22
    }
23
}
24