Passed
Branch master (f937f1)
by Burak
05:52
created

MessageServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 23
ccs 7
cts 7
cp 1
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 2 1
A register() 0 5 1
1
<?php
2
3
namespace App\Providers\Project;
4
5
use App\Interfaces\ContactServiceInterface;
6
use App\Interfaces\MessageServiceInterface;
7
use App\Services\MessageService;
8
use Illuminate\Support\ServiceProvider;
9
10
class MessageServiceProvider extends ServiceProvider
11
{
12
    /**
13
     * Register services.
14
     *
15
     * @return void
16
     */
17 18
    public function register()
18
    {
19 18
        $this->app->bind(MessageServiceInterface::class, function ($app) {
0 ignored issues
show
Unused Code introduced by
The parameter $app is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

19
        $this->app->bind(MessageServiceInterface::class, function (/** @scrutinizer ignore-unused */ $app) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
20 9
            return new MessageService(
21 9
                $this->app->make(ContactServiceInterface::class)
22
            );
23 18
        });
24 18
    }
25
26
    /**
27
     * Bootstrap services.
28
     *
29
     * @return void
30
     */
31 18
    public function boot()
32
    {
33
        //
34 18
    }
35
}
36