ComposerServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 9
ccs 6
cts 6
cp 1
rs 9.6666
cc 1
eloc 5
nc 1
nop 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Tinyissue package.
5
 *
6
 * (c) Mohamed Alsharaf <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Tinyissue\Providers;
13
14
use Illuminate\Bus\Dispatcher;
15
use Illuminate\Support\ServiceProvider;
16
use Illuminate\View\View;
17
use Tinyissue\Form\ExportIssues;
18
19
/**
20
 * ComposerServiceProvider is the view service provider binding data to specific views.
21
 *
22
 * @author Mohamed Alsharaf <[email protected]>
23
 */
24
class ComposerServiceProvider extends ServiceProvider
25
{
26
    /**
27
     * Bootstrap any application services.
28
     *
29
     * @param \Illuminate\Bus\Dispatcher $dispatcher
30
     */
31
    public function boot(Dispatcher $dispatcher)
0 ignored issues
show
Unused Code introduced by
The parameter $dispatcher is not used and could be removed.

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

Loading history...
32
    {
33
        // Add export form to project sidebar
34 63
        \View::composer('layouts/sidebar/project', function (View $view) {
35 36
            $exportForm = new ExportIssues();
36 36
            $exportForm->setup(['project' => $view->project]);
37 36
            $view->with('exportForm', $exportForm);
38 63
        });
39 63
    }
40
41
    /**
42
     * Register any application services.
43
     */
44 63
    public function register()
45
    {
46 63
    }
47
}
48