@return Result

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

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

        $json = $ownerDetails->toArray();

        $data = [
            'externalId' => null,
            'name'       => null,
            'profileUrl' => null,
            'photoUrl'   => null,
            'birthday'   => null,
            'email'      => null,
            'gender'     => null,
            'location'   => null,
            'language'   => null
        ];
        if (isset($json['id']) && $json['id']) {
            $data['externalId'] = $json['id'];
            $data['photoUrl'] = sprintf($this->imageUrlTemplate, $json['id']);
        }
        if (isset($json['name']) && $json['name']) {
            $data['name'] = $json['name'];
        }
        if (isset($json['link']) && $json['link']) {
            $data['profileUrl'] = $json['link'];
        }
        if (isset($json['birthday']) && $json['birthday']) {
            $data['birthday'] = DateTime::createFromFormat('m/d/Y', $json['birthday']);
        }
        if (isset($json['email']) && $json['email']) {
            $data['email'] = $json['email'];
        }
        if (isset($json['gender']) && $json['gender']) {
            $data['gender'] = $json['gender'];
        }
        if (isset($json['location']['name']) && $json['location']['name']) {
            $data['location'] = $json['location']['name'];
        }
        if (isset($json['hometown']['name']) && $json['hometown']['name']) {
            $data['location'] = $json['hometown']['name'];
        }
        if (isset($json['locale']) && $json['locale']) {
            $data['language'] = Locale::getPrimaryLanguage($json['locale']);
        }
        return new Result($data);
    }
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);
        }
    }
342642
public function results()
    {

        if ($this->classname) {
            $orderAdapter = app(\Antares\Datatables\Adapter\OrderAdapter::class);
            $orderAdapter->setClassname($this->classname);
            $orderAdapter->setEngineInstance($this);

            $groupsFilterAdapter = app(\Antares\Datatables\Adapter\GroupsFilterAdapter::class);
            $groupsFilterAdapter->setClassname($this->classname);
            $groupsFilterAdapter->setEngineInstance($this);
        }
        return $this->query->get();
    }
2051
public function setup(): Result
    {
        $result = new Result();
        try {
            $this->connect();
            $connection = DriverManager::getConnection(['pdo' => $this->databaseHandle]);
        } catch (Exception | FilesException |DBALException $exception) {
            $result->addError(new Error($exception->getMessage(), $exception->getCode(), [], 'Connection failed'));
            return $result;
        }

        try {
            $tablesExist = $connection->getSchemaManager()->tablesExist([$this->cacheTableName, $this->tagsTableName]);
        } /** @noinspection PhpRedundantCatchClauseInspection */ catch (DBALException $exception) {
            $result->addError(new Error($exception->getMessage(), $exception->getCode(), [], 'Connection failed'));
            return $result;
        }
        if ($tablesExist) {
            $result->addNotice(new Notice('Tables "%s" and "%s" (already exists)', null, [$this->cacheTableName, $this->tagsTableName]));
        } else {
            $result->addNotice(new Notice('Creating database tables "%s" & "%s"...', null, [$this->cacheTableName, $this->tagsTableName]));
        }

        $fromSchema = $connection->getSchemaManager()->createSchema();
        $schemaDiff = (new Comparator())->compare($fromSchema, $this->getCacheTablesSchema());

        try {
            $statements = $schemaDiff->toSaveSql($connection->getDatabasePlatform());
        } catch (DBALException $exception) {
            $result->addError(new Error($exception->getMessage(), $exception->getCode(), [], 'Connection failed'));
            return $result;
        }
        if ($statements === []) {
            $result->addNotice(new Notice('Table schema is up to date, no migration required'));
            return $result;
        }
        $connection->beginTransaction();
        try {
            foreach ($statements as $statement) {
                $result->addNotice(new Notice('<info>++</info> %s', null, [$statement]));
                $connection->exec($statement);
            }
            $connection->commit();
        } catch (\Exception $exception) {
            try {
                $connection->rollBack();
            } catch (\Exception $exception) {
            }
            $result->addError(new Error('Exception while trying to setup PdoBackend: %s', $exception->getCode(), [$exception->getMessage()]));
        }
        return $result;
    }
1357567
public function getResult()
    {
        $fbData = new FreeBusyData(
            $this->start->getTimeStamp(),
            $this->end->getTimeStamp()
        );
        if ($this->vavailability) {
            $this->calculateAvailability($fbData, $this->vavailability);
        }

        $this->calculateBusy($fbData, $this->objects);

        return $this->generateFreeBusyCalendar($fbData);
    }
1088369
public function result()
    {
        // Don't bother if it didn't go well
        if ($this->_res === false) {
            return false;
        }

        // 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 Start',
                'Lease End',
            ) :

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

        // Append each lease
        for ($i = 0, $num_leases = count($this->_leases); $i < $num_leases; ++$i) {
            $rows[] = array(
                'type' => 'values',
                'columns' =>

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

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

        // Give it off
        return array(
            'root_title' => 'DHCPD IP Leases',
            'rows' => $rows,
        );
    }
383464
private function _getResultData()
    {
        $def = $this->actionChain->getCurrentAction();
        $result = $def['result'];
        if (is_string($result)) {
            return $this->getAttribute($result);
        } elseif (is_array($result)) {
            return array_pop($result);
        } else {
            return null;
        }
    }
240397
private function returnOutput()
    {
        $collection = new Collection($this->results);

        switch ($this->output) {
            case 'db':
                return $this->saveToDatabase($collection);
                break;
            case 'collection':
                return $collection;
                break;
            case 'json':
                return $collection->toJson();
                break;
            case 'array':
            default:
                return $collection->toArray();
        }
    }
422909
protected function getResultOnce()
    {
        if ($this->result !== null) {
            return $this->result;
        }

        $this->result = $this->randomCombinations ? $this->getRandomizedResult()
                                            : $this->getFromProvider($this->limit);

        return $this->result;
    }
197702
public function getResult()
    {
        if ($this->map->currentModel->row instanceof Sql\DataObjects\Result\Row) {
            $criteria = $this->map->currentModel->row->offsetGet($this->map->currentPrimaryKey);
            $field = $this->map->currentTable . '.' . $this->map->currentPrimaryKey;

            $this->map->referenceModel->qb
                ->select([
                    $this->map->referenceTable . '.*',
                ])
                ->join($this->map->currentTable, implode(' = ', [
                    $this->map->currentTable . '.' . $this->map->currentPrimaryKey,
                    $this->map->intermediaryTable . '.' . $this->map->intermediaryCurrentForeignKey,
                ]))
                ->join($this->map->referenceTable, implode(' = ', [
                    $this->map->referenceTable . '.' . $this->map->referencePrimaryKey,
                    $this->map->intermediaryTable . '.' . $this->map->intermediaryReferenceForeignKey,
                ]));

            if ($result = $this->map->intermediaryModel->find($criteria, $field)) {
                return $result;
            }
        }

        return false;
    }
412709
public function getResult()
    {
        $result = $this->mongo->aggregate($this->getCollectionName(), $this->getPipeline());
        return $result->toArray();
    }
297565
public function getResult()
    {
        $result = parent::getResult();
        if (is_array($result) && isset($result['error'])) {
            throw new Exception($result['error']);
        }
        return $result;
    }
801885
public function getResults()
    {
        if ($this->getParent()->{$this->morphType} === $this->morphName) {
            return $this->query->first();
        }
    }
1175488
private function getResult() {
        //返回数据集
        $result =   $this->PDOStatement->fetchAll(PDO::FETCH_ASSOC);
        $this->numRows = count( $result );
        return $result;
    }
1116922
public function result()
    {
        $string = "";
        while ($this->count > 0) {
            $string .= $this->util->cursor->startOfCurrentLine();
            $string .= $this->util->cursor->deleteCurrentLine();
            --$this->count;

            $string .= $this->util->cursor->up();
        }

        $string .= $this->util->cursor->down();

        return $string;
    }
1079799
public function result()
    {

        // Don't bother if it didn't go well
        if ($this->_res == false) {
            return false;
        }

        // Store rows here
        $rows = [];

        // Table header
        $rows[] = array(
            'type' => 'header',
            'columns' => array(
                'Name',
                'Map',
                'Time Left',
                'Gametype',
                'Players',
            ),
        );

        // Have we?
        if (count($this->_res) == 0) {
            $rows[] = array('type' => 'none', 'columns' => array(array(5, 'None found')));
        }

        // We do
        else {

            // Go through each server
            foreach ($this->_res as $server) {

                // No players? Set player column to 'none'
                if ($server['info']['num_players'] == 0) {
                    $players = 'None';
                }

                // We do; populate a mini players table
                else {

                    // Show team column?
                    $show_team = in_array($server['info']['mode'], array(
                                'Infiltration',
                                'Capture the Flag',
                                'Teammatch',
                    ));

                    // Start table
                    $players = '
					<table class="mini" style="text-align: center;">
						<tr>
							<th>Name</th>'.(
                            $show_team ? '
							<th>Team</th>' : '').'
							<th>Score</th>
							<th>Deaths</th>
							<th>Ping</th>
						</tr>';

                    // Add each player to it
                    foreach ($server['info']['players'] as $player) {
                        $players .= '
						<tr'.($show_team ?  (' style="color: '.(
                        array_key_exists($player['team'], self::$team2color) ?
                            self::$team2color[$player['team']] : 'purple'
                        ).';"') : '').'>
							<td>'.htmlspecialchars($player['name']).'</td>'.(
                            $show_team ? '
							<td>'.(array_key_exists($player['team'], self::$team2name) ?
                                self::$team2name[$player['team']] : 'None').'</td>' : '').'
							<td>'.$player['kills'].'</td>
							<td>'.$player['deaths'].'</td>
							<td>'.$player['ping'].'</td>
						</tr>';
                    }

                    // End table
                    $players .= '
					</table>
					';
                }

                // Save result in master table
                $rows[] = array(
                    'type' => 'values',
                    'columns' => array(
                        $server['name'],
                        $server['info']['map'],
                        $server['info']['timeleft'],
                        $server['info']['mode'],
                        $players,
                    ),
                );
            }
        }

        // Give info
        return array(
            'root_title' => 'Soldat Servers',
            'rows' => $rows,
        );
    }
579014
public function query()
    {
        $result = parent::query();
        if( $this->resultClass ) {
            $result->setResultClass($this->getResultClass());
            $result->setResultParams($this->getResultParams());
        }
        return $result;
    }