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

Repeater::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 2
b 0
f 0
nc 1
nop 6
dl 0
loc 14
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
    public $max;
10
11
    public function __construct(
12
        $type,
13
        $name = null,
14
        $buttonAsLink = false,
15
        $renderForBlocks = false,
16
        $renderForModal = false,
17
        $max = null
18
    )
19
    {
20
        parent::__construct($name ?? $type, $name, $renderForBlocks, $renderForModal);
21
22
        $this->buttonAsLink = $buttonAsLink;
23
        $this->type = $type;
24
        $this->max = $max;
25
    }
26
27
    public function render()
28
    {
29
        return view('twill::partials.form._repeater');
30
    }
31
}
32