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 — translatable-with-fallbacks ( b664d2...21ea85 )
by Pedro
11:44
created

HasTranslations::setupTranslatorInstance()   A

Complexity

Conditions 4
Paths 3

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 4
eloc 6
nc 3
nop 0
dl 0
loc 11
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Backpack\CRUD\app\Http\Controllers\Operations\Concerns;
4
5
if(!method_exists(__CLASS__, 'setupTranslatorInstance')) {
6
    trait HasTranslations
7
    {
8
        public function setupTranslatorInstance()
9
        {
10
            if(! method_exists($this->crud->model, 'translationEnabledForModel') || ! class_exists('Spatie\Translatable\Translatable')) {
11
                return;
12
            }
13
14
            if(app('crud')->getOperationSetting('useFallbackLocale')) {
15
                app(\Spatie\Translatable\Translatable::class)->fallback(
16
                    fallbackAny: true, 
17
                );
18
                return;
19
            }
20
        }
21
    }
22
}else{
23
    trait HasTranslations
24
    {
25
    }
26
}