DateTime   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 4
Bugs 1 Features 0
Metric Value
wmc 2
c 4
b 1
f 0
lcom 1
cbo 2
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A input() 0 11 1
A show() 0 6 1
1
<?php namespace Mascame\Artificer\Fields\Types;
2
3
use Carbon\Carbon;
4
use Form;
5
use Mascame\Artificer\Fields\Field;
6
7
class DateTime extends Field
8
{
9
10
    public function input()
11
    {
12
        ?>
13
        <div class="input-group">
14
            <div class="input-group-addon">
15
                <i class="fa fa-calendar"></i>
16
            </div>
17
            <?php print Form::text($this->name, $this->value, $this->attributes->all()); ?>
0 ignored issues
show
Bug introduced by
The method text() does not seem to exist on object<form>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
18
        </div>
19
    <?php
20
    }
21
22
    public function show()
23
    {
24
        $date = Carbon::parse($this->value);
25
26
        return $date->format('d-m-Y H:i:s');
27
    }
28
29
}