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

FrontendController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A sitemap() 0 11 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Mark
5
 * Date: 20/05/2016
6
 * Time: 22:27.
7
 */
8
9
namespace App\Plugins\Pages;
10
11
use App\Model\Page;
12
use App\Plugins\PluginEngine;
13
use App\Classes\SitemapGenerator;
14
use App\Classes\Interfaces\Sitemap;
15
use App\Classes\Repositories\PageRepository;
16
17
/**
18
 * Class UserController.
19
 */
20
class FrontendController extends PluginEngine implements Sitemap
21
{
22
    /**
23
     * The sitemap function allows plugins to quickly and effectively
24
     * create and store new content for the SEO Sitemap Controller.
25
     *
26
     * @param SitemapGenerator $sitemap
27
     * @return SitemapGenerator
28
     */
29
    public function sitemap(SitemapGenerator $sitemap)
30
    {
31
        /** @var PageRepository $repository */
32
        $repository = app(PageRepository::class);
33
34
        /** @var Page $page */
35
        foreach ($repository->whereSitemap() as $page) {
36
            $sitemap->store(url($page->route()), $page->updated_at, 'bi-weekly', '1.0');
0 ignored issues
show
Bug introduced by
It seems like $page->route() can also be of type Illuminate\Database\Eloquent\Builder; however, parameter $path of url() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

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

36
            $sitemap->store(url(/** @scrutinizer ignore-type */ $page->route()), $page->updated_at, 'bi-weekly', '1.0');
Loading history...
37
        }
38
39
        return $sitemap;
40
    }
41
}
42