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

Test Failed
Pull Request — main (#4778)
by Pedro
25:44 queued 10:58
created

testItEnablesTheFiltersButConsiderThemDisableIfEmpty()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 1
b 0
f 1
1
<?php
2
3
namespace Backpack\CRUD\Tests\Unit\CrudPanel;
4
5
/**
6
 * @covers Backpack\CRUD\app\Library\CrudPanel\Traits\Filters
7
 */
8
class CrudPanelFiltersTest extends BaseCrudPanelTest
9
{
10
    protected $testFilter = [[
11
        'name'  => 'my_filter',
12
        'label' => 'filter label',
13
    ], false, false, false];
14
15
    public function testItEnablesTheFiltersButConsiderThemDisableIfEmpty()
16
    {
17
        $this->crudPanel->enableFilters();
18
        $this->assertFalse($this->crudPanel->filtersEnabled());
19
    }
20
21
    public function testItCanAddFiltersToCrudPanel()
22
    {
23
        $this->crudPanel->addFilter(...$this->testFilter);
0 ignored issues
show
Bug introduced by
$this->testFilter is expanded, but the parameter $options of Backpack\CRUD\app\Librar...\CrudPanel::addFilter() does not expect variable arguments. ( Ignorable by Annotation )

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

23
        $this->crudPanel->addFilter(/** @scrutinizer ignore-type */ ...$this->testFilter);
Loading history...
24
25
        $this->assertCount(1, $this->crudPanel->filters());
26
    }
27
28
    public function testItCanClearFilters()
29
    {
30
        $this->crudPanel->addFilter(...$this->testFilter);
0 ignored issues
show
Bug introduced by
$this->testFilter is expanded, but the parameter $options of Backpack\CRUD\app\Librar...\CrudPanel::addFilter() does not expect variable arguments. ( Ignorable by Annotation )

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

30
        $this->crudPanel->addFilter(/** @scrutinizer ignore-type */ ...$this->testFilter);
Loading history...
31
32
        $this->crudPanel->clearFilters();
33
        $this->assertCount(0, $this->crudPanel->filters());
34
    }
35
}
36