Added keys to collectors array.
This commit is contained in:
1 parent
c74051e87d
commit
53efcd28af
2 files changed
+8
-12
No files matched your search
@@ -21,9 +21,9 @@ class Record_Provider implements ServiceProviderInterface, Bootable_Provider_Int
|
||||
|
||||
$pimple['collectors'] = function ( Laps $laps ) {
|
||||
return [
|
||||
new Hook_Record_Collector( $laps['hook.events'], $laps['stopwatch'] ),
|
||||
new Http_Record_Collector( $laps['stopwatch'] ),
|
||||
new Sql_Record_Collector(),
|
||||
'hook' => new Hook_Record_Collector( $laps['hook.events'], $laps['stopwatch'] ),
|
||||
'http' => new Http_Record_Collector( $laps['stopwatch'] ),
|
||||
'sql' => new Sql_Record_Collector(),
|
||||
];
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@ class Record_Provider implements ServiceProviderInterface, Bootable_Provider_Int
|
||||
|
||||
/** @var Record_Collector_Interface $collector */
|
||||
foreach ( $laps['collectors'] as $collector ) {
|
||||
$records[] = $collector->get_records();
|
||||
$records[] = $collector->get_records();
|
||||
}
|
||||
|
||||
return array_merge( ...$records );
|
||||
|
||||
Reference in new issue
Block a user