Completed
Push — v4.0-dev ( b01e70...dabe54 )
by
unknown
01:56
created

FuncArgs::withArgs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace League\Plates\RenderContext;
4
5
use League\Plates;
6
7
class FuncArgs
8
{
9
    public $render;
10
    public $template;
11
    public $func_name;
12
    public $args;
13
14
    public function __construct(Plates\RenderTemplate $render, Plates\Template $template, $func_name = null, $args = []) {
15
        $this->render = $render;
16
        $this->template = $template;
17
        $this->func_name = $func_name;
18
        $this->args = $args;
19
    }
20
21
    public function withName($func_name) {
22
        return new self($this->render, $this->template, $func_name, $this->args);
23
    }
24
    public function withArgs($args) {
25
        return new self($this->render, $this->template, $this->func_name, $args);
26
    }
27
}
28