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

Completed
Push — master ( 85cdf0...87050d )
by Mark
02:35
created

ArticlesController::uninstall()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
rs 9.4285
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\Classes\Interfaces\Installable;
12
use App\Classes\Repositories\PageRepository;
13
use App\Model\Page;
14
use App\Plugins\PluginHandler;
15
16
/**
17
 * Class ArticleController
18
 *
19
 * @package App\Plugins\Articles
20
 */
21
class ArticlesController extends PluginHandler implements Installable
22
{
23
24
    /**
25
     * Return the icon associated with this plugin.
26
     */
27
    public function icon()
28
    {
29
        return 'fa-book';
30
    }
31
32
    /**
33
     * Return the version for this plugin.
34
     */
35
    public function version()
36
    {
37
        return '1.0';
38
    }
39
40
    /**
41
     * The steps required for this plugin product to fully
42
     * integrate into the webservice.
43
     *
44
     * @return boolean
45
     */
46
    public function install()
47
    {
48
        /** @var Page $page */
49
        $page = app(Page::class);
50
51
        $page->seo_title = 'News';
52
        $page->slug = 'news';
53
        $page->enabled = true;
54
        $page->sitemap = false;
55
        $page->plugin = $this->pluginName();
56
57
        // status of the operation
58
        return $page->save();
59
    }
60
61
    /**
62
     * The steps required for this plugin product to fully
63
     * remove itself from the webservice.
64
     *
65
     * @return boolean
0 ignored issues
show
Documentation introduced by
Should the return type not be boolean|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
66
     * @throws \Exception
67
     */
68
    public function uninstall()
69
    {
70
        /** @var PageRepository $repository */
71
        $repository = app(PageRepository::class);
72
73
        /** @var Page $page */
74
        $page = $repository->wherePlugin($this->pluginName());
75
76
        // status of the operation.
77
        return $page->forceDelete();
78
    }
79
}