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

ArticlesController   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 56
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A uninstall() 0 10 1
A icon() 0 3 1
A install() 0 13 1
A version() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Marky
5
 * Date: 23/01/2018
6
 * Time: 15:14.
7
 */
8
9
namespace App\Plugins\Articles;
10
11
use App\Model\Page;
12
use App\Plugins\PluginHandler;
13
use App\Classes\Interfaces\Installable;
14
use App\Classes\Repositories\PageRepository;
15
16
/**
17
 * Class ArticleController.
18
 */
19
class ArticlesController extends PluginHandler implements Installable
20
{
21
    /**
22
     * Return the icon associated with this plugin.
23
     */
24
    public function icon()
25
    {
26
        return 'fa-file-text';
27
    }
28
29
    /**
30
     * Return the version for this plugin.
31
     */
32
    public function version()
33
    {
34
        return '1.1';
35
    }
36
37
    /**
38
     * The steps required for this plugin product to fully
39
     * integrate into the webservice.
40
     *
41
     * @return bool
42
     */
43
    public function install()
44
    {
45
        /** @var Page $page */
46
        $page = app(Page::class);
47
48
        $page->seo_title = 'News';
49
        $page->slug = 'news';
50
        $page->enabled = true;
51
        $page->sitemap = false;
52
        $page->plugin = $this->pluginName();
53
54
        // status of the operation
55
        return $page->save();
56
    }
57
58
    /**
59
     * The steps required for this plugin product to fully
60
     * remove itself from the webservice.
61
     *
62
     * @return bool
63
     * @throws \Exception
64
     */
65
    public function uninstall()
66
    {
67
        /** @var PageRepository $repository */
68
        $repository = app(PageRepository::class);
69
70
        /** @var Page $page */
71
        $page = $repository->wherePlugin($this->pluginName());
72
73
        // status of the operation.
74
        return $page->forceDelete();
75
    }
76
}
77