Completed
Push — dev ( 4f11ce...5d65d1 )
by Alies
06:00 queued 01:47
created

WidgetController::index()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
nc 1
nop 0
dl 0
loc 3
c 0
b 0
f 0
cc 1
rs 10
1
<?php
2
3
namespace Diglabby\Doika\Http\Controllers\Widget;
4
5
use App\Http\Controllers\Controller;
6
use App\Repositories\Contracts\TagRepository;
0 ignored issues
show
Bug introduced by
The type App\Repositories\Contracts\TagRepository 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...
7
use App\Repositories\Contracts\UserRepository;
0 ignored issues
show
Bug introduced by
The type App\Repositories\Contracts\UserRepository 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...
8
use Illuminate\Contracts\Support\Renderable;
9
use Illuminate\Support\Facades\View;
10
11
class WidgetController extends Controller
12
{
13
    public function index(): Renderable
14
    {
15
        return view('widget.campaign');
16
    }
17
18
    /**
19
     * Push attributes in order to correctly localize slugs.
20
     *
21
     * @param $attributes
22
     */
23
    protected function setLocalesAttributes($attributes)
24
    {
25
        View::composer(['partials.alternates', 'partials.locales'], function (\Illuminate\View\View $view) use ($attributes) {
26
            $view->withAttributes($attributes);
27
        });
28
    }
29
30
    /**
31
     * Push translatable object in order to correctly localize slugs.
32
     *
33
     * @param $translatable
34
     */
35
    protected function setTranslatable($translatable)
36
    {
37
        View::composer(['partials.alternates', 'partials.locales'], function (\Illuminate\View\View $view) use ($translatable) {
38
            $view->withTranslatable($translatable);
39
        });
40
    }
41
}
42