Passed
Push — master ( e61f9b...d0aed5 )
by Richard
04:05
created

RateRepository   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 33
rs 10
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\Tax;
4
5
use PWWEB\Core\Repositories\BaseRepository;
0 ignored issues
show
Bug introduced by
The type PWWEB\Core\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\Tax\Rate;
7
8
/**
9
 * PWWEB\Localisation\Repositories\Tax\RateRepository RateRepository.
10
 *
11
 * The repository for Rate.
12
 * Class RateRepository
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 RateRepository extends BaseRepository
20
{
21
    /**
22
     * Fields that can be searched by.
23
     *
24
     * @var array
25
     */
26
    protected $fieldSearchable = [
27
        'rate',
28
        'name',
29
        'compound',
30
        'shipping',
31
        'type',
32
    ];
33
34
    /**
35
     * Return searchable fields.
36
     *
37
     * @return array
38
     */
39
    public function getFieldsSearchable()
40
    {
41
        return $this->fieldSearchable;
42
    }
43
44
    /**
45
     * Configure the Model.
46
     *
47
     * @return \PWWEB\Localisation\Models\Tax\Rate
48
     **/
49
    public function model()
50
    {
51
        return Rate::class;
0 ignored issues
show
Bug Best Practice introduced by
The expression return PWWEB\Localisation\Models\Tax\Rate::class returns the type string which is incompatible with the documented return type PWWEB\Localisation\Models\Tax\Rate.
Loading history...
52
    }
53
}
54