Passed
Push — master ( 697711...2a2aa0 )
by Julien
13:09 queued 09:15
created

FluentChecks::andThat()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php declare(strict_types=1);
2
3
4
namespace Pitchart\Phlunit\Checks\Mixin;
5
6
use Pitchart\Phlunit\Check;
7
use Pitchart\Phlunit\Checks\ArrayCheck;
8
use Pitchart\Phlunit\Checks\BooleanCheck;
9
use Pitchart\Phlunit\Checks\CallableCheck;
10
use Pitchart\Phlunit\Checks\CollectionCheck;
11
use Pitchart\Phlunit\Checks\DateTimeCheck;
12
use Pitchart\Phlunit\Checks\ExceptionCheck;
13
use Pitchart\Phlunit\Checks\FloatCheck;
14
use Pitchart\Phlunit\Checks\FluentCheck;
15
use Pitchart\Phlunit\Checks\GenericCheck;
16
use Pitchart\Phlunit\Checks\IntegerCheck;
17
use Pitchart\Phlunit\Checks\ResponseCheck;
18
use Pitchart\Phlunit\Checks\StringCheck;
19
20
/**
21
 * Class FluentChecks
22
 *
23
 * @package Pitchart\Phlunit\Checks\Mixin
24
 *
25
 * @author Julien VITTE <[email protected]>
26
 *
27
 */
28
trait FluentChecks
29
{
30
    /**
31
     * @template T
32
     * @psalm-return FluentCheck<T>
33
     * @return BooleanCheck|GenericCheck|CallableCheck|CollectionCheck|ResponseCheck|ArrayCheck|DateTimeCheck|StringCheck|ExceptionCheck|FloatCheck|IntegerCheck
34
     */
35 27
    public function that(): self
36
    {
37 27
        return $this;
38
    }
39
40
    /**
41
     * @template T
42
     * @param mixed $sut
43
     * @psalm-param T of mixed
44
     * @psalm-return FluentCheck<T>
45
     * @return BooleanCheck|GenericCheck|CallableCheck|CollectionCheck|ResponseCheck|ArrayCheck|DateTimeCheck|StringCheck|ExceptionCheck|FloatCheck|IntegerCheck
46
     */
47 13
    public function andThat($sut): FluentCheck
48
    {
49 13
        return Check::that($sut);
50
    }
51
52
    /**
53
     * @template T
54
     * @psalm-return FluentCheck<T>
55
     * @return BooleanCheck|GenericCheck|CallableCheck|CollectionCheck|ResponseCheck|ArrayCheck|DateTimeCheck|StringCheck|ExceptionCheck|FloatCheck|IntegerCheck
56
     */
57 14
    public function and(): self
58
    {
59 14
        return $this;
60
    }
61
62
    /**
63
     * @template T
64
     * @psalm-return FluentCheck<T>
65
     * @return BooleanCheck|GenericCheck|CallableCheck|CollectionCheck|ResponseCheck|ArrayCheck|DateTimeCheck|StringCheck|ExceptionCheck|FloatCheck|IntegerCheck
66
     */
67 12
    public function which(): self
68
    {
69 12
        return $this;
70
    }
71
72
}
73