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.

MysqlConnection::getSchemaBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 11
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Milkmeowo\Framework\Database\Connection;
4
5
use Milkmeowo\Framework\Database\Schema\Blueprint;
6
use Milkmeowo\Framework\Database\Schema\Grammars\MysqlGrammar;
7
use Illuminate\Database\MySqlConnection as BaseMySqlConnection;
8
9
class MysqlConnection extends BaseMySqlConnection
10
{
11
    /**
12
     * Get a schema builder instance for the connection.
13
     *
14
     * @return \Illuminate\Database\Schema\MySqlBuilder
15
     */
16
    public function getSchemaBuilder()
17
    {
18
        $builder = parent::getSchemaBuilder();
19
20
        // add a blueprint resolver closure that returns the custom blueprint
21
        $builder->blueprintResolver(function ($table, $callback) {
22
            return new Blueprint($table, $callback);
23
        });
24
25
        return $builder;
26
    }
27
28
    /**
29
     * Get the custom schema grammar instance.
30
     *
31
     * @return \Milkmeowo\Framework\Database\Schema\Grammars\MysqlGrammar
32
     */
33
    protected function getDefaultSchemaGrammar()
34
    {
35
        return $this->withTablePrefix(new MysqlGrammar);
36
    }
37
}
38