Completed
Pull Request — v1.ns (#6)
by Timo
03:13
created
src/ABS/Router/Router.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
      */
75 75
     protected function doReply(\PEIP\INF\Message\Message $message)
76 76
     {
77
-        $channels = (array) $this->selectChannels($message);
77
+        $channels = (array)$this->selectChannels($message);
78 78
         foreach ($channels as $channel) {
79 79
             $this->setOutputChannel($this->resolveChannel($channel));
80 80
             $this->replyMessage($message);
Please login to merge, or discard this patch.
src/ABS/Service/ServiceActivator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     public function doReply(\PEIP\INF\Message\Message $message)
39 39
     {
40 40
         $res = $this->callService($message);
41
-        $out = (bool) $message->hasHeader('REPLY_CHANNEL')
41
+        $out = (bool)$message->hasHeader('REPLY_CHANNEL')
42 42
             ? $message->getHeader('REPLY_CHANNEL')
43 43
             : $this->outputChannel;
44 44
         if ($out) {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $res = null;
60 60
         if (is_callable($this->serviceCallable)) {
61 61
             $res = call_user_func($this->serviceCallable, $message->getContent());
62
-        } else {
62
+        }else {
63 63
             if (is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')) {
64 64
                 $res = $this->serviceCallable->handle($message->getContent());
65 65
             }
Please login to merge, or discard this patch.
src/ABS/Dispatcher/MapDispatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
             return false;
105 105
         }
106 106
 
107
-        return (bool) count($this->listeners[$name]);
107
+        return (bool)count($this->listeners[$name]);
108 108
     }
109 109
 
110 110
     /**
Please login to merge, or discard this patch.
src/Dispatcher/IteratingDispatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
      */
97 97
     public function hasListeners()
98 98
     {
99
-        return (bool) $this->listeners->count();
99
+        return (bool)$this->listeners->count();
100 100
     }
101 101
 
102 102
     /**
Please login to merge, or discard this patch.
src/Dispatcher/ClassDispatcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@
 block discarded – undo
17 17
      */
18 18
     public function connect($name, $listener)
19 19
     {
20
-        $name = is_object($name) ? get_class($name) : (string) $name;
20
+        $name = is_object($name) ? get_class($name) : (string)$name;
21 21
         if (Test::assertClassOrInterfaceExists($name)) {
22 22
             parent::connect($name, $listener);
23
-        } else {
23
+        }else {
24 24
             throw new \InvalidArgumentException($name.' is not an Class nor Interface');
25 25
         }
26 26
     }
Please login to merge, or discard this patch.
src/Dispatcher/ObjectMapDispatcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,9 +108,9 @@
 block discarded – undo
108 108
         $listners = $this->doGetListeners();
109 109
         if (!$this->hadListeners($name, $object)) {
110 110
             $res = false;
111
-        } else {
111
+        }else {
112 112
             $listners = $this->doGetListeners();
113
-            $res = (bool) count($listners[$object][$name]);
113
+            $res = (bool)count($listners[$object][$name]);
114 114
         }
115 115
 
116 116
         return $res;
Please login to merge, or discard this patch.
src/Dispatcher/EventClassDispatcher.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         }
45 45
     }
46 46
 
47
-       //put your code here
47
+        //put your code here
48 48
 
49 49
     /**
50 50
      * Creates an event-object with given object as content/subject and notifies
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
                         ),
37 37
                         $object->getContent()
38 38
                     );
39
-            } else {
39
+            }else {
40 40
                 throw new \InvalidArgumentException('instance of \PEIP\INF\Event\Event must contain subject');
41 41
             }
42
-        } else {
42
+        }else {
43 43
             throw new \InvalidArgumentException('object must be instance of \PEIP\INF\Event\Event');
44 44
         }
45 45
     }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                     $object,
70 70
                     $name,
71 71
                     $headers,
72
-                    (string) $type
72
+                    (string)$type
73 73
                 )
74 74
         );
75 75
     }
Please login to merge, or discard this patch.
src/Dispatcher/ClassEventDispatcher.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         }
82 82
     }
83 83
 
84
-       //put your code here
84
+        //put your code here
85 85
 
86 86
     /**
87 87
      * Creates an event-object with given object as content/subject and notifies
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function connect($name, $object, $listener)
30 30
     {
31
-        $class = is_object($object) ? get_class($object) : (string) $object;
31
+        $class = is_object($object) ? get_class($object) : (string)$object;
32 32
         foreach (Reflection::getImplementedClassesAndInterfaces($object) as $cls) {
33 33
             $reflection = \PEIP\Util\ReflectionPool::getInstance($class);
34 34
             parent::connect($name, $reflection, $listener);
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     public function disconnect($name, $object, $listener)
41 41
     {
42
-        $class = is_object($object) ? get_class($object) : (string) $object;
42
+        $class = is_object($object) ? get_class($object) : (string)$object;
43 43
         $res = true;
44 44
         foreach (Reflection::getImplementedClassesAndInterfaces($object) as $cls) {
45 45
             $reflection = \PEIP\Util\ReflectionPool::getInstance($class);
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
                         ),
74 74
                         $object
75 75
                     );
76
-            } else {
76
+            }else {
77 77
                 throw new \InvalidArgumentException('instance of \PEIP\INF\Event\Event must contain subject');
78 78
             }
79
-        } else {
79
+        }else {
80 80
             throw new \InvalidArgumentException('object must be instance of \PEIP\INF\Event\Event');
81 81
         }
82 82
     }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                     $object,
107 107
                     $name,
108 108
                     $headers,
109
-                    (string) $type
109
+                    (string)$type
110 110
                 )
111 111
         );
112 112
     }
Please login to merge, or discard this patch.
examples/Cafe/lib/messaging/DrinkRouter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
     protected function selectChannels(Message $message)
9 9
     {
10 10
         $order = $message->getContent();
11
-        $channelName = $order['iced']  ? 'coldDrinks' : 'hotDrinks';
11
+        $channelName = $order['iced'] ? 'coldDrinks' : 'hotDrinks';
12 12
         echo PEIP_LINE_SEPARATOR."DrinkRouter: routed to channel: $channelName";
13 13
 
14 14
         return $channelName;
Please login to merge, or discard this patch.