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

GeneratePageRoutes   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 48
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handle() 0 10 2
A __construct() 0 5 1
1
<?php
2
3
namespace App\Console\Commands;
4
5
use App\Model\Menu;
6
use App\Model\Page;
7
use Illuminate\Console\Command;
8
use App\Classes\PageRouteBuilder;
0 ignored issues
show
Bug introduced by
The type App\Classes\PageRouteBuilder 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...
9
use App\Classes\Repositories\MenuRepository;
10
11
class GeneratePageRoutes extends Command
12
{
13
    /**
14
     * @var MenuRepository
15
     */
16
    private $menus;
17
18
    /**
19
     * The name and signature of the console command.
20
     *
21
     * @var string
22
     */
23
    protected $signature = 'page.routes.generate';
24
25
    /**
26
     * The console command description.
27
     *
28
     * @var string
29
     */
30
    protected $description = 'Generate the page routes based on the linked menus.';
31
32
    /**
33
     * Create a new command instance.
34
     *
35
     * @return void
36
     */
37
    public function __construct(MenuRepository $menus)
38
    {
39
        parent::__construct();
40
41
        $this->menus = $menus;
42
    }
43
44
    /**
45
     * Execute the console command.
46
     *
47
     * @return mixed
48
     */
49
    public function handle()
50
    {
51
        /** @var Menu $menu */
52
        foreach ($this->menus->all() as $menu) {
53
            PageRouteBuilder::link($menu->page, $menu);
54
55
            $this->info("{$menu->title} was linked to {$menu->page->slug}");
56
        }
57
58
        return true;
59
    }
60
}
61