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

Country   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A rewards() 0 4 1
A reward() 0 4 1
A users() 0 4 1
1
<?php
2
3
namespace App\Containers\Countries\Models;
4
5
use App\Containers\Reward\Models\Reward;
6
use App\Containers\User\Models\User;
7
use Webpatser\Countries\Countries;
8
9
/**
10
 * Class Country.
11
 *
12
 * @author Mahmoud Zalt <[email protected]>
13
 */
14
class Country extends Countries
15
{
16
17
    public function rewards()
18
    {
19
        return $this->belongsToMany(Reward::class);
20
    }
21
22
    /**
23
     * for the currency
24
     */
25
    public function reward()
26
    {
27
        return $this->hasOne(Reward::class);
28
    }
29
30
    public function users()
31
    {
32
        return $this->hasMany(User::class);
33
    }
34
35
}
36