MySQLiteServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 3
c 3
b 0
f 0
dl 0
loc 20
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 2 1
A register() 0 4 1
1
<?php
2
3
namespace Mhorninger\SQLite;
4
5
use Illuminate\Database\Connection;
6
7
/**
8
 * The Laravel ServiceProvider that initializes the MySQLite Connection.
9
 */
10
class MySQLiteServiceProvider extends \Illuminate\Support\ServiceProvider
11
{
12
    /**
13
     * Bootstrap the application events.
14
     *
15
     * @return void
16
     */
17
    public function boot()
18
    {
19
    }
20
21
    /**
22
     * Register the service provider.
23
     *
24
     * @return Connection connection
25
     */
26
    public function register()
27
    {
28
        Connection::resolverFor('sqlite', function ($connection, $database, $prefix, $config) {
29
            return new MySQLiteConnection($connection, $database, $prefix, $config);
30
        });
31
    }
32
}
33