AddressRepository   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
dl 0
loc 38
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A model() 0 3 1
A getFieldsSearchable() 0 3 1
1
<?php
2
3
namespace PWWEB\Localisation\Repositories;
4
5
use PWWEB\Core\Repositories\BaseRepository;
6
use PWWEB\Localisation\Models\Address;
7
8
/**
9
 * PWWEB\Localisation\Repositories\AddressRepository AddressRepository.
10
 *
11
 * The repository for Address.
12
 * Class AddressRepository
13
 *
14
 * @author    Frank Pillukeit <[email protected]>
15
 * @author    Richard Browne <[email protected]
16
 * @copyright 2020 pw-websolutions.com
17
 * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
18
 */
19
class AddressRepository extends BaseRepository
20
{
21
    /**
22
     * Fields that can be searched by.
23
     *
24
     * @var array
25
     */
26
    protected $fieldSearchable = [
27
        'country_id',
28
        'type_id',
29
        'street',
30
        'street2',
31
        'city',
32
        'state',
33
        'postcode',
34
        'lat',
35
        'lng',
36
        'primary',
37
    ];
38
39
    /**
40
     * Return searchable fields.
41
     *
42
     * @return array
43
     */
44
    public function getFieldsSearchable()
45
    {
46
        return $this->fieldSearchable;
47
    }
48
49
    /**
50
     * Configure the Model.
51
     *
52
     * @return string
53
     **/
54
    public function model()
55
    {
56
        return config('pwweb.localisation.models.address');
57
    }
58
}
59