Test Setup Failed
Push — master ( 6cbb71...97a7ce )
by Anton
01:51
created

MockPage::add()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 4
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace AnaxMocks;
4
5
class MockPage
6
{
7
    public $adds = [];
8
9
    public function add($template, array $data = Array(), string $region = "main", int $sort = 0) : object
10
    {
11
        $this->adds[] = [
12
            "template" => $template,
13
            "data" => $data,
14
            "region" => $region,
15
            "sort" => $sort
16
        ];
17
18
        return $this;
19
    }
20
21
    public function render(array $args = Array(), int $status = 200)
22
    {
23
        return (object)[
24
            "args" => $args,
25
            "status" => $status,
26
            "adds" => $this->adds
27
        ];
28
    }
29
}
30