diff --git a/src/Plugin.php b/src/Plugin.php index 48c874d..2716938 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -27,7 +27,7 @@ class Plugin extends Container { $laps = $this; - $laps['mustache'] = function () { + $laps['mustache'] = function (): \Mustache_Engine { return new \Mustache_Engine( [ 'loader' => new \Mustache_Loader_FilesystemLoader( dirname( __DIR__ ) . '/src/mustache' ), 'cache' => new Mustache_Cache_FrozenCache( dirname( __DIR__ ) . '/src/mustache/cache' ), diff --git a/src/Provider/Hook_Event_Provider.php b/src/Provider/Hook_Event_Provider.php index 2d63caf..81da080 100644 --- a/src/Provider/Hook_Event_Provider.php +++ b/src/Provider/Hook_Event_Provider.php @@ -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(), diff --git a/src/Provider/Manager_Provider.php b/src/Provider/Manager_Provider.php index f703225..78d4b2d 100644 --- a/src/Provider/Manager_Provider.php +++ b/src/Provider/Manager_Provider.php @@ -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(), diff --git a/src/Provider/Record_Provider.php b/src/Provider/Record_Provider.php index 4f6b779..03c23bb 100644 --- a/src/Provider/Record_Provider.php +++ b/src/Provider/Record_Provider.php @@ -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 = [];