Passed
Push — master ( 4a3edd...e1b32a )
by Thomas
03:34 queued 01:45
created

AddressField::toJson()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 6
c 1
b 0
f 0
ccs 0
cts 5
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Webfactor\Laravel\Backpack\FluentSyntax\Fields;
4
5
use Webfactor\Laravel\Backpack\FluentSyntax\Contracts\CrudFieldAbstract;
6
use Webfactor\Laravel\Backpack\FluentSyntax\Traits\Hintable;
7
use Webfactor\Laravel\Backpack\FluentSyntax\Traits\Prefixable;
8
use Webfactor\Laravel\Backpack\FluentSyntax\Traits\Suffixable;
9
10
class AddressField extends CrudFieldAbstract
11
{
12
    use Prefixable, Suffixable, Hintable;
13
14
    protected $type = 'address';
15
16
    public function toJson()
17
    {
18
        $this->options['store_as_json'] = true;
19
20
        return $this;
21
    }
22
}
23