ShouldMethod   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 17
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getAssertList() 0 4 1
1
<?php
2
/**
3
 * ShouldPHP
4
 *
5
 * @author  Gabriel Jacinto <[email protected]>
6
 * @status  dev
7
 * @link    https://github.com/GabrielJMJ/ShouldPHP
8
 * @license MIT
9
 */
10
 
11
namespace Gabrieljmj\Should;
12
13
use Gabrieljmj\Should\ShouldInterface;
14
use Gabrieljmj\Should\Condition\TheMethod\Be;
15
use Gabrieljmj\Should\Condition\TheMethod\Have;
16
17
class ShouldMethod implements ShouldInterface
18
{
19
    public $have;
20
21
    public $be;
22
23
    public function __construct($class, $method)
24
    {
25
        $this->have = new Have($class, $method);
26
        $this->be = new Be($class, $method);
27
    }
28
29
    public function getAssertList()
30
    {
31
        return array_merge($this->have->getAssertList(), $this->be->getAssertList());
32
    }
33
}