examples/resources/TaskExitCode.php
public function run(PayloadInterface $payload)
    {
        /** @var ArrayPayload $payload */
        $payload->setData(
            array_merge(
                $payload->getData(),
                array(
                    __CLASS__ => true
                )
            )
        );

        return 1;
    }
public function run(PayloadInterface $payload)
    {
        /** @var ArrayPayload $payload */
        $payload->setData(
            array_merge(
                $payload->getData(),
                array(
                    __CLASS__ => true
                )
            )
        );

        return 1;
    }
Executes the task.

@param PayloadInterface $payload

@return null|int The exit status code