Completed
Pull Request — master (#13)
by Michael
01:22
created

LaravelEfficientUuidServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Dyrynda\Database;
4
5
use Dyrynda\Database\Connection\MySqlConnection;
6
use Illuminate\Database\Connection;
7
use Illuminate\Database\Schema\Blueprint;
8
use Illuminate\Support\ServiceProvider;
9
10
class LaravelEfficientUuidServiceProvider extends ServiceProvider
11
{
12
13
    /**
14
     * Bootstrap any application services.
15
     *
16
     * @return void
17
     */
18 1
    public function boot()
19
    {
20
        //
21 1
    }
22
23
24
    /**
25
     * Register any application services.
26
     *
27
     * @return void
28
     */
29 1
    public function register()
30
    {
31
        Connection::resolverFor('mysql', function ($connection, $database, $prefix, $config) {
32
            return new MySqlConnection($connection, $database, $prefix, $config);
33 1
        });
34
35
        Blueprint::macro('efficientUuid', function ($column) {
36 1
            $this->addColumn('efficientUuid', $column);
0 ignored issues
show
Bug introduced by
The method addColumn() does not seem to exist on object<Dyrynda\Database\...entUuidServiceProvider>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
37 1
        });
38 1
    }
39
}
40