Completed
Push — master ( 89477f...f97380 )
by Mahmoud
08:17
created

CountryRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 2
dl 0
loc 26
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A model() 0 4 1
1
<?php
2
3
namespace App\Containers\Countries\Data\Repositories;
4
5
use App\Containers\Countries\Models\Country;
6
use App\Port\Repository\Abstracts\Repository;
7
use Prettus\Repository\Contracts\CacheableInterface;
8
use Prettus\Repository\Traits\CacheableRepository;
9
10
/**
11
 * Class CountryRepository.
12
 *
13
 * @author Mahmoud Zalt <[email protected]>
14
 */
15
class CountryRepository extends Repository implements CacheableInterface {
16
17
    use CacheableRepository;
18
19
    // cache the query result of all() (getting all countries) for 1 day   <when caching is enabled>
20
    protected $cacheMinutes = 1440; // 1 day
21
    protected $cacheOnly = ['all'];
22
23
24
    /**
25
     * @var array
26
     */
27
    protected $fieldSearchable = [
28
29
    ];
30
31
    /**
32
     * Specify Model class name.
33
     *
34
     * @return string
35
     */
36
    public function model()
37
    {
38
        return Country::class;
39
    }
40
}
41