Passed
Push — master ( 8be593...d0f45d )
by F
07:27
created

AddressRepository   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
dl 0
loc 34
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 App\Repositories\BaseRepository;
0 ignored issues
show
Bug introduced by
The type App\Repositories\BaseRepository was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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
 * @package   pwweb/localisation
15
 * @author    Frank Pillukeit <[email protected]>
16
 * @author    Richard Browne <[email protected]
17
 * @copyright 2020 pw-websolutions.com
18
 * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
19
*/
20
class AddressRepository extends BaseRepository
21
{
22
    /**
23
     * @var array
24
     */
25
    protected $fieldSearchable = [
26
        'country_id',
27
        'type_id',
28
        'street',
29
        'street2',
30
        'city',
31
        'state',
32
        'postcode',
33
        'lat',
34
        'lng',
35
        'primary'
36
    ];
37
38
    /**
39
     * Return searchable fields.
40
     *
41
     * @return array
42
     */
43
    public function getFieldsSearchable()
44
    {
45
        return $this->fieldSearchable;
46
    }
47
48
    /**
49
     * Configure the Model.
50
     **/
51
    public function model()
52
    {
53
        return Address::class;
54
    }
55
}
56