Skip to content

Commit 827ca5c

Browse files
committed
Change signature of sendPayload() and onPayload() methods
1 parent 394e1e5 commit 827ca5c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Worker.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ public function checkForTermination()
197197

198198
/**
199199
* Sends payload to worker
200-
* @param array $data
200+
* @param mixed $data
201201
*/
202-
public function sendPayload(array $data)
202+
public function sendPayload($data)
203203
{
204204
$this->dataCounter++;
205205
// echo 'It is '.$this->dataCounter.' payload for '.$this->pid.PHP_EOL;
@@ -275,7 +275,7 @@ protected function onWorkerStart($socket, $parentPid)
275275
/**
276276
* The main handler and work executor in worker. Accepts all payload and should do all the work to process it.
277277
*/
278-
public function onPayload(array $payload)
278+
public function onPayload($payload)
279279
{
280280
echo 'I\'m just a worker with pid '.getmypid().'. Got payload: '.print_r($payload, true).PHP_EOL;
281281
return true;

0 commit comments

Comments
 (0)