Completed
Push — master ( 662b61...b40adf )
by George
04:45 queued 02:21
created

VibroServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 12 1
A boot() 0 5 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: georg
5
 * Date: 5/28/2018
6
 * Time: 1:09 PM
7
 */
8
9
namespace Ghaskell\Scaffold\Providers;
10
11
use Ghaskell\Scaffold\VibroCompiler;
0 ignored issues
show
Bug introduced by
The type Ghaskell\Scaffold\VibroCompiler was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
use Illuminate\Support\Facades\App;
13
use Illuminate\View\ViewServiceProvider;
14
15
class VibroServiceProvider extends ViewServiceProvider
16
{
17
    const CONFIG_PATH = __DIR__ . '/../config/scaffold.php';
18
19
    public function boot()
20
    {
21
        $this->publishes([
22
            self::CONFIG_PATH => config_path('scaffold.php'),
23
        ], 'config');
24
    }
25
26
    public function register()
27
    {
28
        $this->app->singleton('vibro.compiler', function () {
29
            return new VibroCompiler(
30
                $this->app['files'], $this->app['config']['view.compiled']
31
            );
32
        });
33
34
        App::bind('vibro', function()
35
        {
36
            return new VibroCompiler(
37
                $this->app['files'], $this->app['config']['view.compiled']
38
            );
39
        });
40
    }
41
42
//    public function registerVibroEngine($resolver)
43
//    {
44
//        $this->app->singleton('blade.compiler', function () {
45
//            return new Vibroblade(
46
//                $this->app['files'], $this->app['config']['view.compiled']
47
//            );
48
//        });
49
//
50
//        $resolver->register('blade', function () {
51
//            return new CompilerEngine($this->app['blade.compiler']);
52
//        });
53
//    }
54
}