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

mpyw / laravel-cached-database-stickiness / 13644536682

04 Mar 2025 01:54AM UTC coverage: 100.0%. Remained the same
13644536682

push

github

web-flow
Update phpunit.xml

148 of 148 relevant lines covered (100.0%)

93.62 hits per line

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

100.0
/src/DispatchesConnectionFactoryEvents.php
1
<?php
2

3
namespace Mpyw\LaravelCachedDatabaseStickiness;
4

5
use Illuminate\Contracts\Events\Dispatcher;
6
use Mpyw\LaravelCachedDatabaseStickiness\Events\ConnectionCreated;
7

8
/**
9
 * Class DispatchesConnectionFactoryEvents
10
 *
11
 * @mixin \Illuminate\Database\Connectors\ConnectionFactory
12
 */
13
trait DispatchesConnectionFactoryEvents
14
{
15
    /** @noinspection PhpDocMissingThrowsInspection */
16

17
    /**
18
     * Dispatch RecordsHaveBeenModified event when records newly modified.
19
     *
20
     * @param  array                           $config
21
     * @param  null|string                     $name
22
     * @return \Illuminate\Database\Connection
23
     */
24
    public function make(array $config, $name = null)
25
    {
26
        $connection = parent::make($config, $name);
136✔
27

28
        /* @noinspection PhpUnhandledExceptionInspection */
29
        $this->container->make(Dispatcher::class)->dispatch(new ConnectionCreated($connection));
136✔
30

31
        return $connection;
136✔
32
    }
33
}
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