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

Fix issue #159 #190

Merged
merged 2 commits into from
May 6, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/ZendDeveloperTools/Profiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

namespace ZendDeveloperTools;

use Zend\Mvc\MvcEvent;
use Zend\Stdlib\PriorityQueue;
use Zend\EventManager\EventInterface;
use Zend\EventManager\EventManagerInterface;
use Zend\EventManager\EventManagerAwareInterface;
use Zend\EventManager\EventManagerInterface;
use Zend\Mvc\MvcEvent;
use Zend\Stdlib\PriorityQueue;

class Profiler implements EventManagerAwareInterface
{
Expand Down Expand Up @@ -146,7 +146,7 @@ public function getEvent()
*/
public function setEventManager(EventManagerInterface $eventManager)
{
$eventManager->addIdentifiers(array(__CLASS__, get_called_class(), 'profiler'));
$eventManager->addIdentifiers([__CLASS__, get_called_class(), 'profiler']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't use PHP 5.4 syntax

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sorry, I will fix it now

$this->eventManager = $eventManager;

return $this;
Expand Down Expand Up @@ -209,7 +209,7 @@ public function collect(MvcEvent $mvcEvent)
if (isset($this->collectors)) {
foreach ($this->collectors as $collector) {
$collector->collect($mvcEvent);
$this->report->addCollector(unserialize(serialize($collector)));
$this->report->addCollector($collector);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the change is acceptable, since we're not storing collectors (which is a shame :-( )

}

$this->eventManager->trigger(ProfilerEvent::EVENT_COLLECTED, $this->getEvent());
Expand Down