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.

DisplayTabsCollection::onlyVisible()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace SleepingOwl\Admin\Display;
4
5
use SleepingOwl\Admin\Contracts\Display\TabInterface;
6
use SleepingOwl\Admin\Contracts\Form\FormElementInterface;
7
use SleepingOwl\Admin\Form\FormElementsCollection;
8
9
class DisplayTabsCollection extends FormElementsCollection
10
{
11
    /**
12
     * @return static
13
     */
14
    public function onlyActive()
15
    {
16
        return $this->filter(function (TabInterface $tab) {
17
            $element = $tab->getContent();
18
19
            if ($element instanceof FormElementInterface) {
20
                return ! $element->isReadonly();
21
            }
22
23
            return true;
24
        })->onlyVisible();
25
    }
26
27
    /**
28
     * @return static
29
     */
30
    public function onlyVisible()
31
    {
32
        return $this->filter(function (TabInterface $tab) {
33
            return $tab->isVisible();
0 ignored issues
show
Bug introduced by
The method isVisible() does not exist on SleepingOwl\Admin\Contracts\Display\TabInterface. Since it exists in all sub-types, consider adding an abstract or default implementation to SleepingOwl\Admin\Contracts\Display\TabInterface. ( Ignorable by Annotation )

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

33
            return $tab->/** @scrutinizer ignore-call */ isVisible();
Loading history...
34
        });
35
    }
36
}
37