Completed
Push — v1.ns ( ff674e...64f725 )
by Timo
03:35
created
src/INF/Event/Event.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,14 +23,14 @@
 block discarded – undo
23 23
 
24 24
 interface Event extends \PEIP\INF\Message\Message {
25 25
 
26
-  public function getName();
26
+    public function getName();
27 27
 
28
-  public function setReturnValue($value);
28
+    public function setReturnValue($value);
29 29
 
30
-  public function getReturnValue();
30
+    public function getReturnValue();
31 31
 
32
-  public function setProcessed($processed);
32
+    public function setProcessed($processed);
33 33
 
34
-  public function isProcessed();
34
+    public function isProcessed();
35 35
 
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
src/INF/Event/EventDispatcher.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@
 block discarded – undo
25 25
 interface EventDispatcher 
26 26
     extends \PEIP\INF\Event\Connectable {
27 27
 
28
-  public function notify($subject);
28
+    public function notify($subject);
29 29
 
30
-  public function notifyUntil($subject);
30
+    public function notifyUntil($subject);
31 31
 
32
-  public function filter($subject);
32
+    public function filter($subject);
33 33
 
34 34
     
35 35
 }
36 36
\ No newline at end of file
Please login to merge, or discard this patch.
src/INF/Dispatcher/MapDispatcher.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@
 block discarded – undo
25 25
     extends \PEIP\INF\Event\Connectable { 
26 26
 
27 27
 
28
-  /**
29
-   * Notifies all listeners of a given event.
30
-   *
31
-   * @param  $event A  instance
32
-   *
33
-   * @return  The  instance
34
-   */
28
+    /**
29
+     * Notifies all listeners of a given event.
30
+     *
31
+     * @param  $event A  instance
32
+     *
33
+     * @return  The  instance
34
+     */
35 35
     public function notify($name, $subject);
36 36
   
37 37
 
Please login to merge, or discard this patch.
src/INF/Dispatcher/ListDispatcher.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,12 +24,12 @@
 block discarded – undo
24 24
 
25 25
 interface ListDispatcher extends \PEIP\INF\Dispatcher\Dispatcher {
26 26
 
27
-  public function connect( $handler);
27
+    public function connect( $handler);
28 28
 
29
-  public function disconnect( $handler);
29
+    public function disconnect( $handler);
30 30
 
31
-  public function hasListeners();
31
+    public function hasListeners();
32 32
 
33
-  public function getListeners();
33
+    public function getListeners();
34 34
 
35 35
 }
36 36
\ No newline at end of file
Please login to merge, or discard this patch.
src/Event/Observable.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@
 block discarded – undo
49 49
     }
50 50
 
51 51
         /**
52
-     * @access public
53
-     * @param $observer 
54
-     * @return 
55
-     */
52
+         * @access public
53
+         * @param $observer 
54
+         * @return 
55
+         */
56 56
     public function addObserver(\PEIP\INF\Event\Observer $observer){
57 57
         $this->observers[] = $observer;     
58 58
     }
Please login to merge, or discard this patch.
src/Dispatcher/EventClassDispatcher.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
                     $this->getListeners(
33 33
                         $name,
34 34
                         $object
35
-                     ),
36
-                     $object->getContent()
37
-                 );
35
+                        ),
36
+                        $object->getContent()
37
+                    );
38 38
             }else{
39 39
                 throw new \InvalidArgumentException('instance of \PEIP\INF\Event\Event must contain subject');
40 40
             }
@@ -43,18 +43,18 @@  discard block
 block discarded – undo
43 43
         }
44 44
     }       //put your code here
45 45
 
46
-     /**
47
-     * Creates an event-object with given object as content/subject and notifies
48
-     * all registers listeners of the event.
49
-     *
50
-     * @access public
51
-     * @param string $name name of the event
52
-     * @param object $object the subject of the event
53
-     * @param array $headers headers of the event-object as key/value pairs
54
-     * @param string $eventClass event-class to create instances from
55
-     * @return
56
-     * @see EventBuilder
57
-     */
46
+        /**
47
+         * Creates an event-object with given object as content/subject and notifies
48
+         * all registers listeners of the event.
49
+         *
50
+         * @access public
51
+         * @param string $name name of the event
52
+         * @param object $object the subject of the event
53
+         * @param array $headers headers of the event-object as key/value pairs
54
+         * @param string $eventClass event-class to create instances from
55
+         * @return
56
+         * @see EventBuilder
57
+         */
58 58
     public function buildAndNotify($name, $object, array $headers = array(), $eventClass = false, $type = false){
59 59
         if(!$this->hasListeners($name, ($object))){
60 60
             return false;
Please login to merge, or discard this patch.
src/Dispatcher/ObjectMapDispatcher.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -209,11 +209,11 @@
 block discarded – undo
209 209
      */    
210 210
     protected static function doNotify(array $listeners, $subject){
211 211
         foreach($listeners as $listener){ 
212
-             if($listener instanceof \PEIP\INF\Handler\Handler){
212
+                if($listener instanceof \PEIP\INF\Handler\Handler){
213 213
                 $listener->handle($subject);
214
-             }elseif(is_callable($listener)){
215
-                 call_user_func($listener, $subject);
216
-             }
214
+                }elseif(is_callable($listener)){
215
+                    call_user_func($listener, $subject);
216
+                }
217 217
         }   
218 218
     }  
219 219
 
Please login to merge, or discard this patch.