Passed
Push — 0.7.0 ( 723ad3...071b71 )
by Alexander
03:46 queued 11s
created

ServiceProvider::booting()   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 1
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
/**
26
 * Loads all the services provider of system.
27
 * 
28
 * @author Alexander Campo <[email protected]>
29
 */
30
abstract class ServiceProvider 
31
{
32
    /**
33
     * The application instance.
34
     * 
35
     * @var \Syscodes\Contracts\Core\Application $app
36
     */
37
    protected $app;
38
39
    /**
40
     * The array of booting callbacks.
41
     * 
42
     * @var callable[] $bootingCallbacks
43
     */
44
    protected $bootingCallbacks = [];
45
46
    /**
47
     * Constructor. Create a new service provider instance.
48
     * 
49
     * @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...
50
     * 
51
     * @return void
52
     */
53
    public function __construct($app)
54
    {
55
        $this->app = $app;
56
    }
57
58
    /**
59
     * Register any application services.
60
     * 
61
     * @return void
62
     */
63
    public function register() {}
64
65
    /**
66
     * Register a new boot listener.
67
     * 
68
     * @param  callable  $callback
69
     * 
70
     * @return void
71
     */
72
    public function booting($callback)
73
    {
74
        $callback();
75
    }
76
}