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

Commit

Permalink
Merge branch 'hotfix/psr-2_compliance' of git://github.com/RWOverdijk…
Browse files Browse the repository at this point in the history
…/zf2 into RWOverdijk-hotfix/psr-2_compliance
  • Loading branch information
Ralph Schindler committed Aug 13, 2012
3 parents b878b24 + 2db85a1 + b8b7692 commit 6546e0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/SharedEventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function attach($id, $event, $callback, $priority = 1)
}
$listeners[] = $this->identifiers[$id]->attach($event, $callback, $priority);
}
if (count($listeners) > 1){
if (count($listeners) > 1) {
return $listeners;
}
return $listeners[0];
Expand Down
16 changes: 8 additions & 8 deletions test/EventManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ public function testAttachAggregateReturnsAttachOfListenerAggregate()
public function testCanDetachListenerAggregates()
{
// setup some other event listeners, to ensure appropriate items are detached
$listenerFooBar1 = $this->events->attach('foo.bar', function(){ return true; });
$listenerFooBar2 = $this->events->attach('foo.bar', function(){ return true; });
$listenerFooBaz1 = $this->events->attach('foo.baz', function(){ return true; });
$listenerOther = $this->events->attach('other', function(){ return true; });
$listenerFooBar1 = $this->events->attach('foo.bar', function() { return true; });
$listenerFooBar2 = $this->events->attach('foo.bar', function() { return true; });
$listenerFooBaz1 = $this->events->attach('foo.baz', function() { return true; });
$listenerOther = $this->events->attach('other', function() { return true; });

$aggregate = new TestAsset\MockAggregate();
$this->events->attachAggregate($aggregate);
Expand All @@ -307,10 +307,10 @@ public function testCanDetachListenerAggregates()
public function testCanDetachListenerAggregatesViaDetach()
{
// setup some other event listeners, to ensure appropriate items are detached
$listenerFooBar1 = $this->events->attach('foo.bar', function(){ return true; });
$listenerFooBar2 = $this->events->attach('foo.bar', function(){ return true; });
$listenerFooBaz1 = $this->events->attach('foo.baz', function(){ return true; });
$listenerOther = $this->events->attach('other', function(){ return true; });
$listenerFooBar1 = $this->events->attach('foo.bar', function() { return true; });
$listenerFooBar2 = $this->events->attach('foo.bar', function() { return true; });
$listenerFooBaz1 = $this->events->attach('foo.baz', function() { return true; });
$listenerOther = $this->events->attach('other', function() { return true; });

$aggregate = new TestAsset\MockAggregate();
$this->events->attach($aggregate);
Expand Down

0 comments on commit 6546e0d

Please sign in to comment.