interface.bdd.php ➔ expect()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
use Peridot\Leo\Assertion;
4
use Peridot\Leo\Leo;
5
6
/**
7
 * Returns Leo's Assertion object and sets
8
 * the actual value on it. The returned Assertion can then
9
 * be used for extension and chainable assertions.
10
 *
11
 * @param  mixed     $actual
12
 * @return Assertion
13
 */
14
function expect($actual)
15
{
16
    $instance = Leo::instance();
17
    $assertion = $instance->getAssertion();
18
19
    return $assertion->setActual($actual);
20
}
21