HasCooldowns   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A cooldown() 0 3 1
1
<?php
2
3
namespace Kurozora\Cooldown;
4
5
use Kurozora\Cooldown\Support\PendingCooldown;
6
7
trait HasCooldowns
8
{
9
    /**
10
     * @param string $name
11
     * @return PendingCooldown
12
     */
13
    public function cooldown($name)
14
    {
15
        return new PendingCooldown($name, $this);
0 ignored issues
show
Bug introduced by
$this of type Kurozora\Cooldown\HasCooldowns is incompatible with the type Illuminate\Database\Eloquent\Model|null expected by parameter $model of Kurozora\Cooldown\Suppor...Cooldown::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

15
        return new PendingCooldown($name, /** @scrutinizer ignore-type */ $this);
Loading history...
16
    }
17
}