Browse Source

Fix PHPCS errors.

Mark Story 11 years ago
parent
commit
b680b4a21f
2 changed files with 6 additions and 5 deletions
  1. 4 3
      src/Event/EventManager.php
  2. 2 2
      tests/TestCase/Event/EventManagerTest.php

+ 4 - 3
src/Event/EventManager.php

@@ -149,7 +149,8 @@ class EventManager
      * @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 @@ class EventManager
     /**
      * 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
      */

+ 2 - 2
tests/TestCase/Event/EventManagerTest.php

@@ -191,7 +191,7 @@ class EventManagerTest extends TestCase
         $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 @@ class EventManagerTest extends TestCase
         $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 = [