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

Submit   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setLabel() 0 8 3
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
}