Completed
Push — master ( bbf6b5...41c395 )
by Robbert
01:56
created
src/events/EventsTree.php 1 patch
Doc Comments   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     /**
81 81
      *	Returns a new EventStack with the given path.
82 82
      *	@param string $path The path to listen or fire an event.
83
-     *	@return EventStack a new EventStack for the given path.
83
+     *	@return EventsTree a new EventStack for the given path.
84 84
      */
85 85
     public function cd($path)
86 86
     {
@@ -115,9 +115,6 @@  discard block
 block discarded – undo
115 115
      *	Non-fluent api method to remove a listener.
116 116
      *	@param string $eventName The name of the event the listener is registered for.
117 117
      *	@param int $id The id of the listener.
118
-     *	@param string $path Optional. The path the listener is registered on. Default is '/'.
119
-     *	@param bool $capture Optional. If true the listener is triggered in the capture phase.
120
-     *		Default is false.
121 118
      */
122 119
     public function removeListener($eventName, $id, $capture = false)
123 120
     {
@@ -127,6 +124,7 @@  discard block
 block discarded – undo
127 124
 
128 125
     /**
129 126
      *	Calls each listener with the given event untill a listener returns false.
127
+     * @param Event $event
130 128
      */
131 129
     private function walkListeners($event)
132 130
     {
@@ -140,6 +138,10 @@  discard block
 block discarded – undo
140 138
         };
141 139
         $result = \arc\tree::parents(
142 140
             $this->tree,
141
+
142
+            /**
143
+             * @param Event $node
144
+             */
143 145
             function ($node, $result) use ($callListeners, $event) {
144 146
                 if ($result !== false && isset( $node->nodeValue['capture.'.$event->name] )) {
145 147
                     return call_user_func($callListeners, $node->nodeValue['capture.'.$event->name] );
@@ -149,6 +151,10 @@  discard block
 block discarded – undo
149 151
         if (!isset( $result )) {
150 152
             $result = \arc\tree::dive(
151 153
                 $this->tree,
154
+
155
+                /**
156
+                 * @param Event $node
157
+                 */
152 158
                 function ($node) use ($callListeners, $event) {
153 159
                     if (isset( $node->nodeValue['listen.'.$event->name] )) {
154 160
                         return call_user_func($callListeners, $node->nodeValue['listen.'.$event->name ] );
Please login to merge, or discard this patch.
src/events/Listener.php 1 patch
Doc Comments   -4 removed lines patch added patch discarded remove patch
@@ -25,10 +25,6 @@
 block discarded – undo
25 25
     /**
26 26
      *	@param string $eventName The name of the event
27 27
      *	@param int $id The id of this listener. This is unique for this eventStack.
28
-     *	@param string $path Optional. The path listened on, defaults to '/'
29
-     *	@param bool $capture Optional. True for capture phase listeners, default is false.
30
-     *	@param Stack $eventStack Optional. The eventStack the listener is registered on. Must be set
31
-     *		for remove() to work.
32 28
      */
33 29
     public function __construct($eventName, $id, $capture = false, $eventStack = null)
34 30
     {
Please login to merge, or discard this patch.