Passed
Pull Request — 2.x (#1360)
by Harings
11:27
created

Repeater::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 10
rs 10
1
<?php
2
3
namespace A17\Twill\View\Components;
4
5
class Repeater extends TwillFormComponent
6
{
7
    public $buttonAsLink;
8
    public $type;
9
10
    public function __construct(
11
        $type,
12
        $name = null,
13
        $buttonAsLink = false
14
    )
15
    {
16
        parent::__construct($name ?? $type, $name);
17
18
        $this->buttonAsLink = $buttonAsLink;
19
        $this->type = $type;
20
    }
21
22
    public function render()
23
    {
24
        return view('twill::partials.form._repeater');
25
    }
26
}
27