Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Pull Request — master (#3616)
by
unknown
15:28
created

WarnBeforeLeaving::setWarnBeforeLeaving()   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 Backpack\CRUD\app\Library\CrudPanel\Traits;
4
5
trait WarnBeforeLeaving
6
{
7
    /**
8
     * Here we check if user should be warned before leaving the page.
9
     *
10
     * @return bool
11
     */
12
    public function getWarnBeforeLeaving(): bool
13
    {
14
        return $this->getOperationSetting('warnBeforeLeaving') ?? config('backpack.crud.operations.'.$this->getCurrentOperation().'.warnBeforeLeaving') ?? false;
0 ignored issues
show
Bug introduced by
It seems like getOperationSetting() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

14
        return $this->/** @scrutinizer ignore-call */ getOperationSetting('warnBeforeLeaving') ?? config('backpack.crud.operations.'.$this->getCurrentOperation().'.warnBeforeLeaving') ?? false;
Loading history...
Bug introduced by
It seems like getCurrentOperation() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

14
        return $this->getOperationSetting('warnBeforeLeaving') ?? config('backpack.crud.operations.'.$this->/** @scrutinizer ignore-call */ getCurrentOperation().'.warnBeforeLeaving') ?? false;
Loading history...
15
    }
16
17
    /**
18
     * Change the variable that determines if user should be warned before leaving the page.
19
     *
20
     * @param bool $value
21
     * @return void
22
     */
23
    public function setWarnBeforeLeaving(bool $value = true): void
24
    {
25
        $this->setOperationSetting('warnBeforeLeaving', $value);
0 ignored issues
show
Bug introduced by
It seems like setOperationSetting() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

25
        $this->/** @scrutinizer ignore-call */ 
26
               setOperationSetting('warnBeforeLeaving', $value);
Loading history...
26
    }
27
}
28