GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 68a2ea...c7bde7 )
by
unknown
01:54
created

LaravelRateLimiterStore::push()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace ViaWork\LeverPhp;
4
5
use Spatie\GuzzleRateLimiterMiddleware\Store;
6
use Illuminate\Support\Facades\Cache;
7
8
class LaravelRateLimiterStore implements Store
9
{
10
    public function get(): array
11
    {
12
        return Cache::get('lever-rate-limiter', []);
13
    }
14
15
    public function push(int $timestamp)
16
    {
17
        Cache::put('lever-rate-limiter', array_merge($this->get(), [$timestamp]));
0 ignored issues
show
Bug introduced by
The call to Illuminate\Support\Facades\Cache::put() has too few arguments starting with ttl. ( Ignorable by Annotation )

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

17
        Cache::/** @scrutinizer ignore-call */ 
18
               put('lever-rate-limiter', array_merge($this->get(), [$timestamp]));

This check compares calls to functions or methods with their respective definitions. If the call has less arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
18
    }
19
}
20