Added keys to collectors array.

This commit is contained in:
Andrey Savchenko committed 2018-02-13 18:16:41 +02:00
1 parent c74051e87d
commit 53efcd28af
2 files changed
+8 -12

No files matched your search

+4 -8
View File
@@ -3,7 +3,6 @@
namespace Rarst\Laps\Record;
use Rarst\Laps\Event\Hook_Event_Config_Interface;
use Rarst\Laps\Events\Laps_Events;
use Symfony\Component\Stopwatch\Stopwatch;
use Symfony\Component\Stopwatch\StopwatchEvent;
@@ -79,13 +78,10 @@ class Hook_Record_Collector implements Record_Collector_Interface {
return $input;
}
$event = wp_parse_args(
$this->events[ $filter_name ][ $priority ],
[
'action' => 'start',
'category' => null,
]
);
$event = wp_parse_args( $this->events[ $filter_name ][ $priority ], [
'action' => 'start',
'category' => null,
] );
if ( 'stop' === $event['action'] && ! $this->stopwatch->isStarted( $event['event'] ) ) {
return $input;