Passed
Push — 0.7.0 ( 2c5a8e...dc9ed8 )
by Alexander
10:13 queued 11s
created

ServiceProvider::isDeferred()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php 
2
3
/**
4
 * Lenevor Framework
5
 *
6
 * LICENSE
7
 *
8
 * This source file is subject to the new BSD license that is bundled
9
 * with this package in the file license.md.
10
 * It is also available through the world-wide-web at this URL:
11
 * https://lenevor.com/license
12
 * If you did not receive a copy of the license and are unable to
13
 * obtain it through the world-wide-web, please send an email
14
 * to [email protected] so we can send you a copy immediately.
15
 *
16
 * @package     Lenevor
17
 * @subpackage  Base
18
 * @link        https://lenevor.com
19
 * @copyright   Copyright (c) 2019 - 2021 Alexander Campo <[email protected]>
20
 * @license     https://opensource.org/licenses/BSD-3-Clause New BSD license or see https://lenevor.com/license or see /license.md
21
 */
22
23
namespace Syscodes\Support;
24
25
use Syscodes\Contracts\Support\Deferrable;
26
27
/**
28
 * Loads all the services provider of system.
29
 * 
30
 * @author Alexander Campo <[email protected]>
31
 */
32
abstract class ServiceProvider 
33
{
34
    /**
35
     * The application instance.
36
     * 
37
     * @var \Syscodes\Contracts\Core\Application $app
38
     */
39
    protected $app;
40
41
    /**
42
     * Constructor. Create a new service provider instance.
43
     * 
44
     * @param  \Syscodes\Contracts\Core\Applicacion  $app
0 ignored issues
show
Bug introduced by
The type Syscodes\Contracts\Core\Applicacion 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...
45
     * 
46
     * @return void
47
     */
48
    public function __construct($app)
49
    {
50
        $this->app = $app;
51
    }
52
53
    /**
54
     * Register any application services.
55
     * 
56
     * @return void
57
     */
58
    public function register() {}
59
60
    /**
61
     * Register a new boot listener.
62
     * 
63
     * @param  \callable  $callback
0 ignored issues
show
Bug introduced by
The type callable 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...
64
     * 
65
     * @return void
66
     */
67
    public function booting($callback)
68
    {
69
        $callback();
70
    }
71
72
    /**
73
     * Get the services provided by the provider.
74
     * 
75
     * @return array
76
     */
77
    public function provides()
78
    {
79
        return [];
80
    }
81
82
    /**
83
     * Get the events that trigger this service provider to register.
84
     * 
85
     * @return array
86
     */
87
    public function when()
88
    {
89
        return [];
90
    }
91
92
    /**
93
     * Determine if the provider is deferred.
94
     * 
95
     * @return bool
96
     */
97
    public function isDeferred()
98
    {
99
        return $this instanceof Deferrable;
100
    }
101
}