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
Push — master ( 09cf36...e01915 )
by Cristian
15:00 queued 01:06
created

Sluggable::replicate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Backpack\CRUD\app\Models\Traits\SpatieTranslatable;
4
5
use Cviebrock\EloquentSluggable\Sluggable as OriginalSluggable;
0 ignored issues
show
Bug introduced by
The type Cviebrock\EloquentSluggable\Sluggable was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Illuminate\Database\Eloquent\Builder;
7
8
trait Sluggable
9
{
10
    use OriginalSluggable;
11
12
    /**
13
     * Query scope for finding "similar" slugs, used to determine uniqueness.
14
     *
15
     * @param \Illuminate\Database\Eloquent\Builder $query
16
     * @param string                                $attribute
17
     * @param array                                 $config
18
     * @param string                                $slug
19
     *
20
     * @return \Illuminate\Database\Eloquent\Builder
21
     */
22
    public function scopeFindSimilarSlugs(Builder $query, string $attribute, array $config, string $slug): Builder
23
    {
24
        $separator = $config['separator'];
25
        $attribute = $attribute.'->'.$this->getLocale();
26
27
        return $query->where(function (Builder $q) use ($attribute, $slug, $separator) {
28
            $q->where($attribute, '=', $slug)
29
                ->orWhere($attribute, 'LIKE', $slug.$separator.'%')
30
                // Fixes issues with Json data types in MySQL where data is sourrounded by "
31
                ->orWhere($attribute, 'LIKE', '"'.$slug.$separator.'%');
32
        });
33
    }
34
}
35