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

Repeater   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 3 1
A __construct() 0 10 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
    )
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