LeaderboardPlayerReward   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A timescope() 0 3 1
A find() 0 3 1
1
<?php
2
3
namespace Furic\Leaderboards\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class LeaderboardPlayerReward extends Model
8
{
9
10
    protected $guarded = [];
11
12
    public static function find($leaderbarodTimescopeId, $playerId)
13
    {
14
        return SELF::where('leaderboard_timescope_id', $leaderbarodTimescopeId)->where('player_id', $playerId)->first();
15
    }
16
    
17
    public function timescope()
18
    {
19
        return $this->belongsTo(LeaderboardTimescope::class);
20
    }
21
    
22
}