Status/WorkerStatus.php
public static function fromArrayOrObject($arrayOrObject)
    {
        if (is_array($arrayOrObject)) {
            return new static(
                isset($arrayOrObject['textStatus']) ? $arrayOrObject['textStatus'] : null,
                isset($arrayOrObject['counters']) ? array_map(function ($counter) {
                    return WorkerCounter::fromArrayOrObject($counter);
                }, $arrayOrObject['counters']) : []);
        } elseif (is_object($arrayOrObject)) {
            return new static(
                isset($arrayOrObject->textStatus) ? $arrayOrObject->textStatus : null,
                isset($arrayOrObject->counters) ? array_map(function ($counter) {
                    return WorkerCounter::fromArrayOrObject($counter);
                }, $arrayOrObject->counters) : []);
        }
    }
public static function fromArrayOrObject($arrayOrObject)
    {
        if (is_array($arrayOrObject)) {
            return new static(
                isset($arrayOrObject['textStatus']) ? $arrayOrObject['textStatus'] : null,
                isset($arrayOrObject['counters']) ? array_map(function ($counter) {
                    return WorkerCounter::fromArrayOrObject($counter);
                }, $arrayOrObject['counters']) : []);
        } elseif (is_object($arrayOrObject)) {
            return new static(
                isset($arrayOrObject->textStatus) ? $arrayOrObject->textStatus : null,
                isset($arrayOrObject->counters) ? array_map(function ($counter) {
                    return WorkerCounter::fromArrayOrObject($counter);
                }, $arrayOrObject->counters) : []);
        }
    }
@param array|object $arrayOrObject

@return static