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

TimePicker::render()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
namespace A17\Twill\View\Components;
4
5
class TimePicker extends DatePicker
6
{
7
    public function render()
8
    {
9
        $this->timeOnly = true;
10
        $this->withTime = true;
11
        $this->altFormat = $this->altFormat ?? (($this->time24Hr ?? false) ? 'H:i' : 'h:i K');
12
        return view('twill::partials.form._date_picker');
13
    }
14
}
15