Completed
Push — master ( 925ecf...691399 )
by Aivis
08:17 queued 02:32
created

Handlers/LaravelQueueHandler.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php namespace Understand\UnderstandLaravel5\Handlers;
2
3
class LaravelQueueHandler extends BaseHandler
4
{
5
6
    /**
7
     * Send data to storage
8
     *
9
     * @param mixed $requestData
10
     * @return type
11
     */
12
    protected function send($requestData)
13
    {
14
        try
15
        {
16
            \Queue::push('Understand\UnderstandLaravel5\Handlers\LaravelQueueListener@listen', [
17
                'requestData' => $requestData
18
            ]);
19
        }
20
        catch (\Exception $ex)
21
        {
22
            if ( ! $this->silent)
23
            {
24
                throw new \Understand\UnderstandLaravel5\Exceptions\HandlerException($ex->getMessage(), $ex->getCode(), $ex);
25
            }
26
        }
27
    }
28
29
    /**
30
     * Serialize data and send to storage
31
     *
32
     * @param array $requestData
33
     * @return array
34
     */
35
    public function handle(array $requestData)
36
    {
37
        return $this->send($requestData);
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->send($requestData); of type Understand\UnderstandLaravel5\Handlers\type|null adds the type Understand\UnderstandLaravel5\Handlers\type to the return on line 37 which is incompatible with the return type of the parent method Understand\UnderstandLar...ers\BaseHandler::handle of type array.
Loading history...
38
    }
39
40
}
41