Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Commit

Permalink
Replace existing Zend\EventManager\Event type hints with Zend\EventMa…
Browse files Browse the repository at this point in the history
…nager\EventInterface.
  • Loading branch information
alex-patterson-webdev authored and weierophinney committed Dec 26, 2019
1 parent 36ea185 commit 81f9127
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
8 changes: 4 additions & 4 deletions src/Collector/EventCollectorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace ZendDeveloperTools\Collector;

use Zend\EventManager\Event;
use Zend\EventManager\EventInterface;

/**
* Event Data Collector Interface.
Expand All @@ -17,8 +17,8 @@ interface EventCollectorInterface
/**
* Collects event-level information
*
* @param string $id
* @param Event $event
* @param string $id
* @param EventInterface $event
*/
public function collectEvent($id, Event $event);
public function collectEvent($id, EventInterface $event);
}
8 changes: 4 additions & 4 deletions src/Collector/MemoryCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace ZendDeveloperTools\Collector;

use ZendDeveloperTools\EventLogging\EventContextProvider;
use Zend\EventManager\Event;
use Zend\EventManager\EventInterface;
use Zend\Mvc\MvcEvent;

/**
Expand Down Expand Up @@ -47,10 +47,10 @@ public function collect(MvcEvent $mvcEvent)
/**
* Saves the current memory usage.
*
* @param string $id
* @param Event $event
* @param string $id
* @param EventInterface $event
*/
public function collectEvent($id, Event $event)
public function collectEvent($id, EventInterface $event)
{
$contextProvider = new EventContextProvider($event);
$context['name'] = $contextProvider->getEvent()->getName();
Expand Down
8 changes: 4 additions & 4 deletions src/Collector/TimeCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace ZendDeveloperTools\Collector;

use ZendDeveloperTools\EventLogging\EventContextProvider;
use Zend\EventManager\Event;
use Zend\EventManager\EventInterface;
use Zend\Mvc\MvcEvent;

/**
Expand Down Expand Up @@ -49,10 +49,10 @@ public function collect(MvcEvent $mvcEvent)
/**
* Saves the current time in microseconds for a specific event.
*
* @param string $id
* @param Event $event
* @param string $id
* @param EventInterface $event
*/
public function collectEvent($id, Event $event)
public function collectEvent($id, EventInterface $event)
{
$contextProvider = new EventContextProvider($event);
$context['time'] = microtime(true);
Expand Down
8 changes: 3 additions & 5 deletions src/Listener/EventLoggingListenerAggregate.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use ZendDeveloperTools\Collector\CollectorInterface;
use ZendDeveloperTools\Collector\EventCollectorInterface;
use ZendDeveloperTools\Profiler;
use Zend\EventManager\Event;
use Zend\EventManager\EventInterface;
use Zend\EventManager\SharedEventManagerInterface;

/**
Expand Down Expand Up @@ -74,13 +74,11 @@ public function detachShared(SharedEventManagerInterface $events)
/**
* Callback to process events
*
* @param Event $event
*
* @param EventInterface $event
* @return bool
*
* @throws ServiceNotFoundException
*/
public function onCollectEvent(Event $event)
public function onCollectEvent(EventInterface $event)
{
foreach ($this->collectors as $collector) {
$collector->collectEvent('application', $event);
Expand Down

0 comments on commit 81f9127

Please sign in to comment.