@param DOMElement $result

@return void
421398
protected function init(DOMElement $result)
    {
        $oldStatus = XmlUtil::getRequiredAttributeValue($result, 'old-status');
        $this->setOldStatus($oldStatus);
        if ($result->hasAttribute('status')) {
            $status = XmlUtil::getRequiredAttributeValue($result, 'status');
            $this->setStatus($status);
        }

        $this->parseId($result, false);

        if ($result->hasAttribute('due-date')) {
            $this->dueDate = XmlUtil::getRequiredAttributeValue($result, 'due-date');
        }

        if ($result->hasAttribute('split')) {
            $split = XmlUtil::getRequiredAttributeValue($result, 'split');
            $this->setSplit($split);
        }


        if ($result->hasAttribute('join')) {
            $join = XmlUtil::getRequiredAttributeValue($result, 'join');
            $this->setJoin($join);
        }

        if ($result->hasAttribute('step')) {
            $step = XmlUtil::getRequiredAttributeValue($result, 'step');
            $this->setStep($step);
        }

        if ($result->hasAttribute('owner')) {
            $owner = XmlUtil::getRequiredAttributeValue($result, 'owner');
            $this->setOwner($owner);
        }

        if ($result->hasAttribute('display-name')) {
            $displayName = XmlUtil::getRequiredAttributeValue($result, 'display-name');
            $this->setDisplayName($displayName);
        }

        // set up validators -- OPTIONAL
        $v = XMLUtil::getChildElement($result, 'validators');
        if (null !== $v) {
            $validators = XMLUtil::getChildElements($v, 'validator');
            foreach ($validators as $validator) {
                $validatorDescriptor = DescriptorFactory::getFactory()->createValidatorDescriptor($validator);
                $validatorDescriptor->setParent($this);
                $this->validators->attach($validatorDescriptor);
            }
        }

        // set up pre-functions -- OPTIONAL
        $pre = XMLUtil::getChildElement($result, 'pre-functions');
        if (null !== $pre) {
            $preFunctions = XMLUtil::getChildElements($pre, 'function');
            foreach ($preFunctions as $preFunction) {
                $functionDescriptor = DescriptorFactory::getFactory()->createFunctionDescriptor($preFunction);
                $functionDescriptor->setParent($this);
                $this->preFunctions->attach($functionDescriptor);
            }
        }

        // set up post-functions - OPTIONAL
        $post = XMLUtil::getChildElement($result, 'post-functions');
        if (null !== $post) {
            $postFunctions = XMLUtil::getChildElements($post, 'function');
            foreach ($postFunctions as $postFunction) {
                $functionDescriptor = DescriptorFactory::getFactory()->createFunctionDescriptor($postFunction);
                $functionDescriptor->setParent($this);
                $this->postFunctions->attach($functionDescriptor);
            }
        }
    }
935634
function cache($query, $result) {
        if ($this->isSelectStatement($query) === TRUE) $this->queries[$query] = $result;
        else return(FALSE);
        return(TRUE);
    }
821609
public function when($result)
    {
        if (\is_callable($result)) {
            $result = $result();
        }

        if ($this->can_proceed() && $result !== true) {
            $this->shortcircuit = true;
        }

        return $this;
    }
876666
protected function sequential(DOMElement $element, $storage): void
    {
        if (\is_array($storage)) {
            $this->addCollectionNode($element, $storage);
            return;
        }

        $this->addSequentialNode($element, $storage);
    }
79047
protected function addNode(DOMElement $element, $key, $value): void
    {
        $key   = \str_replace(' ', '-', $key);
        $child = $this->element($key);
        $element->appendChild($child);
        $this->convert($child, $value);
    }
24030
protected function _sortResult(array &$result, $sort = 'asort')
    {
        // Sorting
        switch ($sort) {
            case 'asort':
                asort($result);
                break;

            case 'ksort':
                ksort($result);
                break;

            case 'natsort':
                natsort($result);
                break;

            default:
                $sort($result);
        }
    }
678068
public function process(DOMElement $node, Item $item)
    {
        foreach ($this->keys as $key) {
            $item->setExtra($key, $this->getValue($node, $key));
        }
    }
158352
public function finish(string $name, array $result = null)
    {
        if ($this->enabled && $this->has($name)) {
            $this->getSwoole()->finish([
                'name' => $name,
                'result' => $result
            ]);
        }
    }
1175329
protected function succeed($result = null)
    {
        $this->isFinished = true;
        $this->isSuccess = true;
        $this->result = $result;
    }
1148631
private void addResult(ValidationResult result) {
		if (result == null || result.count() == 0) {
			return;
		}
		this.results.add(result);
	}
847117
protected function add_result($result) {
        if (is_array($result)) {
            // Adding the result to the oldest parent.
            if ($this->get_parent()) {
                $parent = $this->get_grandparent();
                $parent->add_result($result);
            } else {
                $this->results = array_merge($this->results, $result);
            }
        }
    }
221126
public function run(TestResult $result)
    {
        $this->applyFocus($result);

        $this->eventEmitter->on('test.failed', function () {
            if ($this->configuration->shouldStopOnFailure()) {
                $this->eventEmitter->emit('suite.halt');
            }
        });

        $this->eventEmitter->emit('runner.start');
        $this->suite->setEventEmitter($this->eventEmitter);
        $start = microtime(true);
        $this->suite->run($result);
        $this->eventEmitter->emit('runner.end', [microtime(true) - $start, $result]);
    }
316059
public function addToSet($result, $field = null)
    {
        $field = $this->prepareField($field ?: $result);

        $this->fields[$result] = ['$addToSet' => $field];

        return $this;
    }
502356
protected function done($result = null)
    {
        if ($result === null) {
            $this->event('error', $this->error());
        }

        $this->event('done', $result);
        $this->event = null;

        return $result;
    }
745879
protected function init(DOMElement $split)
    {
        $this->parseId($split);

        $uResults = XMLUtil::getChildElements($split, 'unconditional-result');

        foreach ($uResults as $result) {
            $resultDescriptor = new ResultDescriptor($result);
            $resultDescriptor->setParent($this);
            $this->results->attach($resultDescriptor);
        }
    }
530496
public function convertArticleLayout($result) {
        if (isset($result->chapters)) {
            $result->chapters = array_map(
                array($this, '_convertChapterLayout'),
                $result->chapters->toArray()
            );
        }
    }
855406
public function addResult($result, $value)
    {
        if (! $this->open) {
            return;
        }
        
        if ($value !== null) {
            $this->results[$result] = $value;
        }
    }