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 ( c47878...796af4 )
by Mark
02:48
created

Framework::isLatestVersion()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Mark
5
 * Date: 05/02/2017
6
 * Time: 02:41.
7
 */
8
9
namespace App;
10
11
use App\Classes\Library\Services\Github;
12
13
/**
14
 * Class Framework.
15
 */
16
class Framework
17
{
18
    /**
19
     * The framework application name.
20
     *
21
     * @return string
22
     */
23
    public $package = 'Webshelf';
24
25
    /**
26
     * The framework version number.
27
     *
28
     * @return string
29
     */
30
    public $version = '2.4.0';
31
32
    /**
33
     * The framework application website.
34
     *
35
     * @return string
36
     */
37
    public $website = '#';
38
39
    /**
40
     * The applications github repository.
41
     * Used for getting the app version.
42
     *
43
     * @return string
44
     */
45
    public $repository = 'webshelf/framework';
46
47
    /**
48
     * Get the latest github release for version checking.
49
     *
50
     * @return string
51
     */
52
    public function githubVersion()
53
    {
54
        return Github::latestReleaseVersion($this->repository) ?: 'unknown';
55
    }
56
57
    /**
58
     * Check if the framework is updated to the latest version.
59
     *
60
     * @return bool
61
     */
62
    public function isLatestVersion()
63
    {
64
        if (app()->isLocal()) {
65
            return true;
66
        }
67
68
        return $this->version != $this->githubVersion();
69
    }
70
}
71