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.
Completed
Push — main ( 7f7f31...6f22db )
by Pascal
01:36 queued 36s
created

NegativeNullableBooleanCaster::set()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 4
1
<?php declare(strict_types=1);
2
3
namespace ProtoneMedia\LaravelEloquentScopeAsSelect;
4
5
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
6
7
class NegativeNullableBooleanCaster implements CastsAttributes
8
{
9
    /**
10
     * Transform the attribute from the underlying model values.
11
     *
12
     * @param  \Illuminate\Database\Eloquent\Model  $model
13
     * @param  string  $key
14
     * @param  mixed  $value
15
     * @param  array  $attributes
16
     * @return mixed
17
     */
18
    public function get($model, $key, $value, $attributes)
19
    {
20
        return !(bool) $value;
21
    }
22
23
    /**
24
     * Transform the attribute to its underlying model values.
25
     *
26
     * @param  \Illuminate\Database\Eloquent\Model  $model
27
     * @param  string  $key
28
     * @param  mixed  $value
29
     * @param  array  $attributes
30
     * @return mixed
31
     */
32
    public function set($model, $key, $value, $attributes)
33
    {
34
        return $value;
35
    }
36
}
37