Added return types to closures.
This commit is contained in:
1 parent
204c1df755
commit
4013046e4f
4 files changed
+6
-6
No files matched your search
@@ -21,7 +21,7 @@ class Hook_Event_Provider implements ServiceProviderInterface {
|
||||
*/
|
||||
public function register( Container $pimple ): void {
|
||||
|
||||
$pimple['hook.events'] = function () {
|
||||
$pimple['hook.events'] = function (): array {
|
||||
return [
|
||||
'core' => new Core_Events(),
|
||||
'genesis' => new Genesis_Events(),
|
||||
|
||||
@@ -20,7 +20,7 @@ class Manager_Provider implements ServiceProviderInterface, Bootable_Provider_In
|
||||
*/
|
||||
public function register( Container $pimple ): void {
|
||||
|
||||
$pimple['managers'] = function ( Plugin $laps ) {
|
||||
$pimple['managers'] = function ( Plugin $laps ): array {
|
||||
return [
|
||||
new Load_Order_Manager(),
|
||||
new Asset_Manager(),
|
||||
|
||||
@@ -23,11 +23,11 @@ class Record_Provider implements ServiceProviderInterface, Bootable_Provider_Int
|
||||
*/
|
||||
public function register( Container $pimple ): void {
|
||||
|
||||
$pimple['stopwatch'] = $pimple->factory( function () {
|
||||
$pimple['stopwatch'] = $pimple->factory( function (): Stopwatch {
|
||||
return new Stopwatch( true );
|
||||
} );
|
||||
|
||||
$pimple['collectors'] = function ( Plugin $laps ) {
|
||||
$pimple['collectors'] = function ( Plugin $laps ): array {
|
||||
return [
|
||||
'core' => new Core_Load_Collector(),
|
||||
'hook' => new Hook_Record_Collector( $laps['stopwatch'], $laps['hook.events'] ),
|
||||
@@ -36,7 +36,7 @@ class Record_Provider implements ServiceProviderInterface, Bootable_Provider_Int
|
||||
];
|
||||
};
|
||||
|
||||
$pimple['records'] = function ( Plugin $laps ) {
|
||||
$pimple['records'] = function ( Plugin $laps ): array {
|
||||
|
||||
$records = [];
|
||||
|
||||
|
||||
Reference in new issue
Block a user