@@ -23,7 +23,7 @@ |
||
23 | 23 | * @param callable $callback |
24 | 24 | * @param null|array $options |
25 | 25 | * |
26 | - * @return object |
|
26 | + * @return Client |
|
27 | 27 | * |
28 | 28 | * @throws ServiceNotFoundException if unable to resolve the service. |
29 | 29 | * @throws ServiceNotCreatedException if an exception is raised when |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | $eventManager->expects(static::once()) |
28 | 28 | ->method('triggerEvent') |
29 | - ->with(static::callback(function (PamiEvent $e) use ($client, $pamiEvent) { |
|
29 | + ->with(static::callback(function(PamiEvent $e) use ($client, $pamiEvent) { |
|
30 | 30 | static::assertInstanceOf('PamiModule\\Event\\PamiEvent', $e); |
31 | 31 | static::assertSame($client, $e->getTarget()); |
32 | 32 | static::assertSame($pamiEvent, $e->getEvent()); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | ->method('attach') |
32 | 32 | ->with($eventManager); |
33 | 33 | |
34 | - $callback = function () use ($client) { |
|
34 | + $callback = function() use ($client) { |
|
35 | 35 | return $client; |
36 | 36 | }; |
37 | 37 |
@@ -290,7 +290,7 @@ |
||
290 | 290 | $eventManager->expects(static::exactly(1)) |
291 | 291 | ->method('triggerEventUntil') |
292 | 292 | ->with(static::callback( |
293 | - function ($callback) use ($response) { |
|
293 | + function($callback) use ($response) { |
|
294 | 294 | static::assertFalse($callback(null)); |
295 | 295 | static::assertFalse($callback('string')); |
296 | 296 | static::assertFalse($callback([])); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | public function handle(EventMessage $e) |
37 | 37 | { |
38 | 38 | $eventPrefix = 'event.'; |
39 | - $eventName = $eventPrefix . $e->getName(); |
|
39 | + $eventName = $eventPrefix.$e->getName(); |
|
40 | 40 | $event = new PamiEvent(); |
41 | 41 | $event->setName($eventName); |
42 | 42 | $event->setTarget($this->client); |
@@ -190,6 +190,6 @@ |
||
190 | 190 | ksort($keys); |
191 | 191 | ksort($variables); |
192 | 192 | |
193 | - return md5($prefix . json_encode(array_merge($keys, $variables))); |
|
193 | + return md5($prefix.json_encode(array_merge($keys, $variables))); |
|
194 | 194 | } |
195 | 195 | } |
@@ -99,14 +99,14 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function connect() |
101 | 101 | { |
102 | - $results = $this->getEventManager()->trigger(__FUNCTION__ . '.pre', $this); |
|
102 | + $results = $this->getEventManager()->trigger(__FUNCTION__.'.pre', $this); |
|
103 | 103 | if ($results->stopped()) { |
104 | 104 | return $this; |
105 | 105 | } |
106 | 106 | |
107 | 107 | $this->connection->open(); |
108 | 108 | |
109 | - $this->getEventManager()->trigger(__FUNCTION__ . '.post', $this); |
|
109 | + $this->getEventManager()->trigger(__FUNCTION__.'.post', $this); |
|
110 | 110 | |
111 | 111 | return $this; |
112 | 112 | } |
@@ -118,14 +118,14 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public function disconnect() |
120 | 120 | { |
121 | - $results = $this->getEventManager()->trigger(__FUNCTION__ . '.pre', $this); |
|
121 | + $results = $this->getEventManager()->trigger(__FUNCTION__.'.pre', $this); |
|
122 | 122 | if ($results->stopped()) { |
123 | 123 | return $this; |
124 | 124 | } |
125 | 125 | |
126 | 126 | $this->connection->close(); |
127 | 127 | |
128 | - $this->getEventManager()->trigger(__FUNCTION__ . '.post', $this); |
|
128 | + $this->getEventManager()->trigger(__FUNCTION__.'.post', $this); |
|
129 | 129 | |
130 | 130 | return $this; |
131 | 131 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | */ |
140 | 140 | public function process() |
141 | 141 | { |
142 | - $results = $this->getEventManager()->trigger(__FUNCTION__ . '.pre', $this); |
|
142 | + $results = $this->getEventManager()->trigger(__FUNCTION__.'.pre', $this); |
|
143 | 143 | |
144 | 144 | if ($results->stopped()) { |
145 | 145 | return $this; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | |
148 | 148 | $this->connection->process(); |
149 | 149 | |
150 | - $this->getEventManager()->trigger(__FUNCTION__ . '.post', $this); |
|
150 | + $this->getEventManager()->trigger(__FUNCTION__.'.post', $this); |
|
151 | 151 | |
152 | 152 | return $this; |
153 | 153 | } |
@@ -164,9 +164,9 @@ discard block |
||
164 | 164 | public function sendAction(OutgoingMessage $action) |
165 | 165 | { |
166 | 166 | $params = new ArrayObject(['action' => $action]); |
167 | - $event = new Event(__FUNCTION__ . '.pre', $this, $params); |
|
167 | + $event = new Event(__FUNCTION__.'.pre', $this, $params); |
|
168 | 168 | $results = $this->getEventManager()->triggerEventUntil( |
169 | - function ($response) { |
|
169 | + function($response) { |
|
170 | 170 | return $response instanceof ResponseMessage; |
171 | 171 | }, |
172 | 172 | $event |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $response = $this->connection->send($action); |
179 | 179 | |
180 | 180 | $params['response'] = $response; |
181 | - $this->getEventManager()->trigger(__FUNCTION__ . '.post', $this, $params); |
|
181 | + $this->getEventManager()->trigger(__FUNCTION__.'.post', $this, $params); |
|
182 | 182 | |
183 | 183 | return $response; |
184 | 184 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | protected function setUp() |
17 | 17 | { |
18 | 18 | parent::setUp(); |
19 | - $this->moduleLoader = new ModuleLoader(include __DIR__ . '/../../TestConfiguration.php'); |
|
19 | + $this->moduleLoader = new ModuleLoader(include __DIR__.'/../../TestConfiguration.php'); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | public function testCreateService() |
@@ -16,7 +16,7 @@ |
||
16 | 16 | protected function setUp() |
17 | 17 | { |
18 | 18 | parent::setUp(); |
19 | - $this->moduleLoader = new ModuleLoader(include __DIR__ . '/../../TestConfiguration.php'); |
|
19 | + $this->moduleLoader = new ModuleLoader(include __DIR__.'/../../TestConfiguration.php'); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | public function testCreateService() |