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

ArticleCategoryRepository   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A whereStatusActive() 0 3 1
1
<?php
2
3
namespace App\Classes\Repositories;
4
5
use App\Model\Menu;
6
use App\Model\ArticleCategory;
7
use Illuminate\Support\Collection;
8
use Illuminate\Database\Eloquent\Builder;
9
10
/**
11
 * Class ArticleCategoryRepository.
12
 */
13
class ArticleCategoryRepository extends BaseRepository
14
{
15
    /**
16
     * @var ArticleCategory|Builder|Collection
17
     */
18
    protected $model;
19
20
    /**
21
     * PageRepository constructor.
22
     *
23
     * @param Menu $model
24
     */
25
    public function __construct(ArticleCategory $model)
26
    {
27
        $this->model = $model;
28
    }
29
30
    /**
31
     * @return \Illuminate\Database\Eloquent\Collection|mixed|static[]
32
     */
33
    public function whereStatusActive()
34
    {
35
        return $this->model->where('status', true)->get();
0 ignored issues
show
Bug introduced by
The call to Illuminate\Support\Collection::get() has too few arguments starting with key. ( Ignorable by Annotation )

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

35
        return $this->model->where('status', true)->/** @scrutinizer ignore-call */ get();

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...
36
    }
37
}
38