• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mpyw / laravel-pdo-emulation-control / 13646667069

04 Mar 2025 05:07AM UTC coverage: 0.0% (-100.0%) from 100.0%
13646667069

Pull #8

github

mpyw
WIP
Pull Request #8: chore: 🤖 Bump version

0 of 19 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/ConnectionServiceProvider.php
1
<?php
2

3
namespace Mpyw\LaravelPdoEmulationControl;
4

5
use Closure;
6
use Illuminate\Database\Connection;
7
use Illuminate\Support\ServiceProvider;
8
use Mpyw\LaravelPdoEmulationControl\Connections\MySqlConnection;
9
use Mpyw\LaravelPdoEmulationControl\Connections\PostgresConnection;
10
use Mpyw\LaravelPdoEmulationControl\Connections\SQLiteConnection;
11
use Mpyw\LaravelPdoEmulationControl\Connections\SqlServerConnection;
12

13
class ConnectionServiceProvider extends ServiceProvider
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function register(): void
19
    {
20
        Connection::resolverFor('mysql', $this->resolverFor(MySqlConnection::class));
×
21
        Connection::resolverFor('pgsql', $this->resolverFor(PostgresConnection::class));
×
22
        Connection::resolverFor('sqlite', $this->resolverFor(SQLiteConnection::class));
×
23
        Connection::resolverFor('sqlsrv', $this->resolverFor(SqlServerConnection::class));
×
24
    }
25

26
    /**
27
     * Create resolver for the connection.
28
     *
29
     * @param  string   $class
30
     * @return \Closure
31
     */
32
    protected function resolverFor(string $class): Closure
33
    {
34
        return static function (...$args) use ($class) {
×
35
            return new $class(...$args);
×
36
        };
×
37
    }
38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc