B
B
BonBon Slick2018-06-21 22:51:49
PHP
BonBon Slick, 2018-06-21 22:51:49

What hint to register if the result is returned through Promise?

https://robertbasic.com/blog/prooph-query-bus/

/**
     * @param GetUserList $command
     *
     * @return Paginator|UserCollection ???? если оставить выдает варнинг что метод должен что то вернуть
     */
    public function handle(GetUserList $query, Deferred $deferred)
    {
        $i = random_int(1, 2);

        if ($i % 2 === 0) {
            $deferred->resolve('DONE!');
        }

        $deferred->reject('Out of luck');
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Nesmeyanov, 2018-06-21
@BonBonSlick

Judging by the code: "@return void"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question