GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 9e304b...e448f2 )
by Steeven
03:32
created

Migration::__call()   A

Complexity

Conditions 4
Paths 4

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 4
eloc 7
c 1
b 1
f 0
nc 4
nop 2
dl 0
loc 11
rs 10
1
<?php
2
/**
3
 * This file is part of the O2System Framework package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @author         Steeve Andrian Salim
9
 * @copyright      Copyright (c) Steeve Andrian Salim
10
 */
11
// ------------------------------------------------------------------------
12
13
namespace O2System\Framework\Models\Sql;
14
15
// ------------------------------------------------------------------------
16
17
/**
18
 * Class Migration
19
 * @package O2System\Framework\Models\Sql
20
 */
21
class Migration
22
{
23
    /**
24
     * Model::$db
25
     *
26
     * Database connection instance.
27
     *
28
     * @var \O2System\Database\Sql\Abstracts\AbstractConnection
29
     */
30
    public $db;
31
32
    /**
33
     * Model::$qb
34
     *
35
     * Database query builder instance.
36
     *
37
     * @var \O2System\Database\Sql\Abstracts\AbstractQueryBuilder
38
     */
39
    public $qb;
40
41
    // ------------------------------------------------------------------------
42
43
    /**
44
     * Model::$forge
45
     *
46
     * Database forge instance.
47
     *
48
     * @var \O2System\Database\Sql\Abstracts\AbstractForge
0 ignored issues
show
Bug introduced by
The type O2System\Database\Sql\Abstracts\AbstractForge 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...
49
     */
50
    public $forge;
51
52
    // ------------------------------------------------------------------------
53
54
    /**
55
     * Migration::__construct
56
     */
57
    public function __construct()
58
    {
59
        // Set database connection
60
        if (method_exists(database(), 'loadConnection')) {
61
            if ($this->db = database()->loadConnection('default')) {
62
                $this->qb = $this->db->getQueryBuilder();
63
                $this->forge = $this->db->getForge();
64
            }
65
        }
66
    }
67
68
    // ------------------------------------------------------------------------
69
70
    /**
71
     * Migration::__call
72
     *
73
     * @param string $method
74
     * @param array $arguments
75
     *
76
     * @return mixed
77
     */
78
    public function __call($method, array $arguments = [])
79
    {
80
        if (method_exists($this, $method)) {
81
            return call_user_func_array([&$this, $method], $arguments);
82
        } elseif (method_exists($this->db, $method)) {
83
            return call_user_func_array([&$this->db, $method], $arguments);
84
        } elseif (method_exists($this->forge, $method)) {
85
            return call_user_func_array([&$this->forge, $method], $arguments);
86
        }
87
88
        return false;
89
    }
90
}