Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
9 / 9 |
DeduplicationProvider | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
9 / 9 |
boot | |
100.00% |
1 / 1 |
1 | |
100.00% |
3 / 3 |
|||
register | |
100.00% |
1 / 1 |
1 | |
100.00% |
6 / 6 |
1 | <?php |
2 | |
3 | namespace Qmp\Laravel\Deduplication\Providers; |
4 | |
5 | use Illuminate\Support\Collection; |
6 | use Illuminate\Support\ServiceProvider; |
7 | use Illuminate\Support\Str; |
8 | use Qmp\Laravel\Deduplication\Console\Commands\DockerDedup; |
9 | use Qmp\Laravel\Deduplication\Objects\HandleFile; |
10 | use Qmp\Laravel\MicroService\DbConnection\DbConnection; |
11 | use Qmp\Laravel\MicroService\QueueConnection\QueueConnection; |
12 | |
13 | class DeduplicationProvider extends ServiceProvider |
14 | { |
15 | /** |
16 | * Boot the service provider. |
17 | * |
18 | * @return void |
19 | */ |
20 | public function boot() |
21 | { |
22 | $this->loadViewsFrom(realpath(__DIR__.'/../Views'), 'emails_deduplication'); |
23 | $this->loadMigrationsFrom(__DIR__ . '/../database/migrations/'); |
24 | } |
25 | |
26 | public function register() |
27 | { |
28 | DbConnection::mergeFromFile(realpath(__DIR__.'/../../config/connection.php')); |
29 | QueueConnection::mergeFromFile(realpath(__DIR__.'/../../config/queue.php')); |
30 | |
31 | $this->app->singleton(HandleFile::class, function ($app) { |
32 | return new HandleFile(); |
33 | }); |
34 | } |
35 | } |