1 | <?php |
||
20 | abstract class BaseServiceProvider extends ServiceProvider |
||
21 | { |
||
22 | /** |
||
23 | * The alias pattern. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $aliasPattern = '{{class}}Contract'; |
||
28 | |||
29 | /** |
||
30 | * Register an IoC binding if it's not already been registered. |
||
31 | * |
||
32 | * @param string $abstract |
||
33 | * @param \Closure|string|null $concrete |
||
34 | * @param bool $shared |
||
35 | * @param bool $force |
||
36 | * |
||
37 | * @return void |
||
38 | */ |
||
39 | protected function bind($abstract, $concrete = null, $shared = true, $force = false) |
||
46 | |||
47 | /** |
||
48 | * Register an IoC binding whether it's already been registered or not. |
||
49 | * |
||
50 | * @param string $abstract |
||
51 | * @param \Closure|string|null $concrete |
||
52 | * @param bool $shared |
||
53 | * @param string|null $alias |
||
54 | * @param bool $force |
||
55 | * |
||
56 | * @return void |
||
57 | */ |
||
58 | protected function bindAndAlias($abstract, $concrete = null, $shared = true, $alias = null, $force = false) |
||
66 | |||
67 | /** |
||
68 | * Prepare the alias. |
||
69 | * |
||
70 | * @param string|null $alias |
||
71 | * @param mixed $concrete |
||
72 | * |
||
73 | * @return string |
||
|
|||
74 | */ |
||
75 | protected function prepareAlias($alias, $concrete) |
||
84 | } |
||
85 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.