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

Repeater   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 22
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 3 1
A __construct() 0 12 1
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
        $renderForBlocks = false,
15
        $renderForModal = false
16
    )
17
    {
18
        parent::__construct($name ?? $type, $name, $renderForBlocks, $renderForModal);
19
20
        $this->buttonAsLink = $buttonAsLink;
21
        $this->type = $type;
22
    }
23
24
    public function render()
25
    {
26
        return view('twill::partials.form._repeater');
27
    }
28
}
29