From b680b4a21f25bfa4d451949f96fbf510997b271b Mon Sep 17 00:00:00 2001 From: Mark Story Date: Wed, 28 Jan 2015 22:07:15 -0500 Subject: [PATCH] Fix PHPCS errors. --- src/Event/EventManager.php | 7 ++++--- tests/TestCase/Event/EventManagerTest.php | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Event/EventManager.php b/src/Event/EventManager.php index 39e10722b2a..0a924e34c98 100644 --- a/src/Event/EventManager.php +++ b/src/Event/EventManager.php @@ -149,7 +149,8 @@ public function attach($callable, $eventKey = null, array $options = []) * @throws \InvalidArgumentException When event key is missing or callable is not an * instance of Cake\Event\EventListenerInterface. */ - public function on($eventKey = null, $options = [], $callable = null) { + public function on($eventKey = null, $options = [], $callable = null) + { if ($eventKey instanceof EventListenerInterface) { $this->_attachSubscriber($eventKey); return; @@ -252,8 +253,8 @@ public function detach($callable, $eventKey = null) /** * Removes a listener from the active listeners. * - * @param string|\Cake\Event\EventListenerInterface $eventKey The event unique identifier name - * with which the callback has been associated, or the $listener you want to remove. + * @param string|\Cake\Event\EventListenerInterface $eventKey The event unique identifier name + * with which the callback has been associated, or the $listener you want to remove. * @param callback $callable The callback you want to detach. * @return void */ diff --git a/tests/TestCase/Event/EventManagerTest.php b/tests/TestCase/Event/EventManagerTest.php index 370cccbaeb3..01e426efb45 100644 --- a/tests/TestCase/Event/EventManagerTest.php +++ b/tests/TestCase/Event/EventManagerTest.php @@ -191,7 +191,7 @@ public function testOff() $manager = new EventManager(); $manager->on('fake.event', ['AClass', 'aMethod']); $manager->on('another.event', ['AClass', 'anotherMethod']); - $manager->on('another.event', ['priority' => 1], 'fakeFunction'); + $manager->on('another.event', ['priority' => 1], 'fakeFunction'); $manager->off('fake.event', ['AClass', 'aMethod']); $this->assertEquals([], $manager->listeners('fake.event')); @@ -216,7 +216,7 @@ public function testOffFromAll() $manager = new EventManager(); $manager->on('fake.event', ['AClass', 'aMethod']); $manager->on('another.event', ['AClass', 'aMethod']); - $manager->on('another.event', ['priority' => 1], 'fakeFunction'); + $manager->on('another.event', ['priority' => 1], 'fakeFunction'); $manager->off(['AClass', 'aMethod']); $expected = [