Text   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A input() 0 4 1
A guarded() 0 4 1
A displayFilter() 0 4 1
A filter() 0 4 1
1
<?php namespace Mascame\Artificer\Fields\Types;
2
3
use Form;
4
use Input;
5
use Mascame\Artificer\Fields\Field;
6
7
//use Mascame\Artificer\Widgets\FocalPoint;
8
9
10
class Text extends Field
11
{
12
13
    public function input()
14
    {
15
        return 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...
16
    }
17
18
    public function guarded()
19
    {
20
        return "<div>" . $this->value . "</div>";
21
    }
22
23
    public function displayFilter()
24
    {
25
        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...
26
    }
27
28
    public function filter($query, $value)
29
    {
30
        return $query->where($this->name, 'LIKE', '%' . $value . '%');
31
    }
32
}