CallableCollectionTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A typeClass() 0 3 1
A typeInvalidValues() 0 3 1
A typeValidValues() 0 5 1
1
<?php
2
3
namespace Nip\Collections\Tests\Typed;
4
5
use Nip\Collections\Tests\AbstractTest;
6
use Nip\Collections\Typed\CallableCollection;
7
8
/**
9
 * Class CallableCollectionTest
10
 * @package Nip\Collections\Tests\Typed
11
 */
12
class CallableCollectionTest extends AbstractTest
13
{
14
    use AbstractTypeTraitTest;
15
16
    /**
17
     * @return string
18
     */
19
    protected function typeClass()
20
    {
21
        return CallableCollection::class;
22
    }
23
24
    protected function typeInvalidValues(): array
25
    {
26
        return ['string'];
27
    }
28
29
    protected function typeValidValues(): array
30
    {
31
        return [
32
            (function () {
33
                return true;
34
            })
35
        ];
36
    }
37
}
38