@return Result

@SuppressWarnings(PHPMD.UnusedFormalParameter)
481694
public function getData(array $options)
    {
        $provider = $this->getProvider();

        $ownerDetails = $provider->getResourceOwner($this->accessToken);
        $data = $ownerDetails->toArray();

        return new Result([
            'externalId' => $data['id'],
            'name'       => $data['name'],
            'profileUrl' => $data['html_url'],
            'photoUrl'   => $data['avatar_url']
        ]);
    }
899053
protected function getResult()
    {
        while ($this->result instanceof Promise && null !== $this->result->result)
        {
            $this->result = $this->result->result;
        }

        return $this->result;
    }
993744
public ResultSet getResults() {
        final SQLListenerContextImpl context = startContext(connection(), queryMixin.getMetadata());
        String queryString = null;
        List<Object> constants = ImmutableList.of();

        try {
            listeners.preRender(context);
            SQLSerializer serializer = serialize(false);
            queryString = serializer.toString();
            logQuery(queryString, serializer.getConstants());
            context.addSQL(getSQL(serializer));
            listeners.rendered(context);

            listeners.notifyQuery(queryMixin.getMetadata());

            constants = serializer.getConstants();

            listeners.prePrepare(context);
            final PreparedStatement stmt = getPreparedStatement(queryString);
            setParameters(stmt, constants, serializer.getConstantPaths(), getMetadata().getParams());
            context.addPreparedStatement(stmt);
            listeners.prepared(context);

            listeners.preExecute(context);
            final ResultSet rs = stmt.executeQuery();
            listeners.executed(context);

            return new ResultSetAdapter(rs) {
                @Override
                public void close() throws SQLException {
                    try {
                        super.close();
                    } finally {
                        stmt.close();
                        reset();
                        endContext(context);
                    }
                }
            };
        } catch (SQLException e) {
            onException(context, e);
            reset();
            endContext(context);
            throw configuration.translate(queryString, constants, e);
        }
    }
1071704
public function getResults()
    {
        if (null === $this->results) {
            $this->results = $this->getQuery()
                ->find($this->con);
        }

        return $this->results;
    }
898555
public function spawnResult()
    {
        $result = null;
        foreach ($this->getAllImplementations(StorageWrite::class) as $impl) {
            $result = $impl->spawnResult();
        }
        return $result;
    }
613180
public function getResults()
    {
        if (empty($this->results)) {
            $this->results = $this->stmt->fetchAll();
        }

        return $this->results;
    }
347127
public function getResultForMultiStatus()
    {
        $r = [
            200 => [],
            404 => [],
        ];
        foreach ($this->result as $propertyName => $info) {
            if (!isset($r[$info[0]])) {
                $r[$info[0]] = [$propertyName => $info[1]];
            } else {
                $r[$info[0]][$propertyName] = $info[1];
            }
        }
        // Removing the 404's for multi-status requests.
        if (self::ALLPROPS === $this->requestType) {
            unset($r[404]);
        }

        return $r;
    }
278305
public function execute() {
        global $DB;

        $result = new workshop_allocation_result($this);

        // make sure the workshop itself is at the expected state

        if ($this->workshop->phase != workshop::PHASE_SUBMISSION) {
            $result->set_status(workshop_allocation_result::STATUS_FAILED,
                get_string('resultfailedphase', 'workshopallocation_scheduled'));
            return $result;
        }

        if (empty($this->workshop->submissionend)) {
            $result->set_status(workshop_allocation_result::STATUS_FAILED,
                get_string('resultfaileddeadline', 'workshopallocation_scheduled'));
            return $result;
        }

        if ($this->workshop->submissionend > time()) {
            $result->set_status(workshop_allocation_result::STATUS_VOID,
                get_string('resultvoiddeadline', 'workshopallocation_scheduled'));
            return $result;
        }

        $current = $DB->get_record('workshopallocation_scheduled',
            array('workshopid' => $this->workshop->id, 'enabled' => 1), '*', IGNORE_MISSING);

        if ($current === false) {
            $result->set_status(workshop_allocation_result::STATUS_FAILED,
                get_string('resultfailedconfig', 'workshopallocation_scheduled'));
            return $result;
        }

        if (!$current->enabled) {
            $result->set_status(workshop_allocation_result::STATUS_VOID,
                get_string('resultdisabled', 'workshopallocation_scheduled'));
            return $result;
        }

        if (!is_null($current->timeallocated) and $current->timeallocated >= $this->workshop->submissionend) {
            $result->set_status(workshop_allocation_result::STATUS_VOID,
                get_string('resultvoidexecuted', 'workshopallocation_scheduled'));
            return $result;
        }

        // so now we know that we are after the submissions deadline and either the scheduled allocation was not
        // executed yet or it was but the submissions deadline has been prolonged (and hence we should repeat the
        // allocations)

        $settings = workshop_random_allocator_setting::instance_from_text($current->settings);
        $randomallocator = $this->workshop->allocator_instance('random');
        $randomallocator->execute($settings, $result);

        // store the result in the instance's table
        $update = new stdClass();
        $update->id = $current->id;
        $update->timeallocated = $result->get_timeend();
        $update->resultstatus = $result->get_status();
        $update->resultmessage = $result->get_message();
        $update->resultlog = json_encode($result->get_logs());

        $DB->update_record('workshopallocation_scheduled', $update);

        return $result;
    }
1021363
public function loadResult()
	{
		$ret = null;

		// Execute the query and get the result set cursor.
		if (!($cursor = $this->execute()))
		{
			return null;
		}

		// Get the first row from the result set as an array.
		if ($row = sqlsrv_fetch_array($cursor, SQLSRV_FETCH_NUMERIC))
		{
			$ret = $row[0];
		}

		// Free up system resources and return.
		$this->freeResult($cursor);

		// For SQLServer - we need to strip slashes
		$ret = stripslashes($ret);

		return $ret;
	}
536551
public function get()
    {
        $result = $this->getRaw();

        $result = new PlasticResult($result);

        if ($this->model) {
            $this->getModelFiller()->fill($this->model, $result);
        }

        return $result;
    }
716421
public function getResult()
    {
        $result = curl_getinfo($this->resource);

        if (curl_errno($this->resource)) {
            $result['error'] = curl_error($this->resource);
        }

        return [
            'url' => isset($result['url']) ? $result['url'] : null,
            'statusCode' => isset($result['http_code']) ? $result['http_code'] : null,
            'contentType' => isset($result['content_type']) ? $result['content_type'] : null,
            'info' => $result,
            'content' => $this->body,
            'headers' => $this->headers,
            'data' => $this->data,
        ];
    }
503710
private function getResult()
    {
        $result = [];
        foreach ($this->attributes->getAttributes() as $key) {
            $result[] = $this->arrayAnalyzer($key);
        }

        return $result;
    }
1287101
public function GetSimpleResult()
     {
        $rearr = array();
        foreach($this->simpleResult as $k=>$v)
        {
            if( empty($v['w']) ) continue;
            $w = $this->_out_string_encoding($v['w']);
            if( $w != ' ' ) $rearr[] = $w;
        }
        return $rearr;
     }
1051564
public function execute() {
        if (!$this->checkExists()) {
            if ($this->current === self::OP_SELECT) {
                return new ArrayCollection();
            }

            return false;
        }
        $this->createQuery();

        $model = ($this->expected) ? $this->getRowModel() : null;
        if ($this->current === self::OP_SELECT && $this->isCached()) {
            $result = $this->getCached();
        }
        if (!$result) {
            if ($this->preserveQueries && $this->current !== self::OP_SELECT) // keep all queries except selects
                    $this->doPreserveQueries();
            $result = $this->connection->doPrepare($this->query, $this->values,
                    array(
                'multipleRows' => $this->multiple,
                'model' => $model
            ));

            if ($this->current === self::OP_SELECT) $this->saveCache($result);
            else $this->removeCache();
        }

        if ($this->current === self::OP_SELECT)
                $result = $this->returnSelect($result);
        $this->lastQuery = $this->query . '<pre><code>' . print_r($this->values,
                        true) . '</code></pre>';
        $this->resetQuery();
        return $result;
    }
778410
public function result()
    {
        // Store rows here
        $rows = [];

        // Start showing connections
        $rows[] = array(
            'type' => 'header',
            'columns' =>

            // Not hiding mac address?
            !$this->_hide_mac ? array(
                'IP Address',
                'MAC Address',
                'Hostname',
                'Lease End',
            ) :

            // Hiding it indeed
                array(
                'IP Address',
                'Hostname',
                'Lease End',
            ),
        );

        // Append each lease
        foreach ($this->_leases as $lease) {
            $rows[] = array(
                'type' => 'values',
                'columns' =>

                // Not hiding mac addresses?
                !$this->_hide_mac ? array(
                    $lease['ip'],
                    $lease['mac'],
                    array_key_exists('hostname', $lease) ?
                        $lease['hostname'] : '<em>unknown</em>',
                    date(self::DATE_FORMAT, $lease['lease_end']),
                ) :

                // Hiding them indeed
                array(
                    $lease['ip'],
                    array_key_exists('hostname', $lease) ?
                        $lease['hostname'] : '<em>unknown</em>',
                    date(self::DATE_FORMAT, $lease['lease_end']),
                ),
            );
        }

        // Give it off
        return array(
            'root_title' => 'DnsMasq DHCPD IP Leases',
            'rows' => $rows,
        );
    }
1351148
public function get()
    {
        $encoded_results = json_encode($this->results);

        // Clear results by resetting ID counter and results' container
        $this->results = [];
        $this->id_result = 0;

        return $encoded_results;
    }
672144
protected function popResult()
    {
        $result = $this->result;
        $this->result = array_pop($this->resultStack);
        return $result;
    }