Completed
Push — master ( 839e9e...4e091b )
by Costin
03:53
created

Submit::setLabel()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 3
nc 3
nop 0
1
<?php
2
3
namespace SoareCostin\BladeFormComponents\FormElements;
4
5
use SoareCostin\BladeFormComponents\FormElement;
6
7
class Submit extends FormElement
8
{
9
    protected function setLabel()
10
    {
11
        parent::setLabel();
12
13
        if (is_null($this->label)) {
14
            $this->label = is_null($this->model) ? 'Create' : 'Edit';
15
        }
16
    }
17
}