Email::show()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace Mascame\Artificer\Fields\Types;
2
3
use Form;
4
use HTML;
5
use Input;
6
use Mascame\Artificer\Fields\Field;
7
8
class Email extends Field
9
{
10
11
    public function input()
12
    {
13
        return Form::email($this->name, $this->value, $this->attributes->all());
0 ignored issues
show
Bug introduced by
The method email() 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...
14
    }
15
16
    public function show()
17
    {
18
        return HTML::mailto($this->value, $this->value);
19
    }
20
21
    public function displayFilter()
22
    {
23
        return Form::text($this->name, Input::old($this->name), $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...
24
    }
25
26
    public function filter($query, $value)
27
    {
28
        return $query->where($this->name, 'LIKE', '%' . $value . '%');
29
    }
30
}