Finalize a tournament that has had all match scores submitted, rendering its results permanent.

@return Tournament
975700
public function finalize()
    {
        if ($this->state != 'awaiting_review') {
            throw new StillRunningException('Tournament is still running.');
        }

        $response = Guzzle::post("tournaments/{$this->id}/finalize");
        return $this->updateModel($response->tournament);
    }
509659
public function finalize() : Values
    {
        /* @var input\Parameter $parameter */
        foreach ($this->definitions as $name => $parameter) {
            if (isset($this->items[$name])) {
                continue;
            }

            // In the case of Parameters which do not accept values (ie. optional flags), we explicitly default them
            // to a boolean false, opposed to a boolean true when they are actually set in input.
            $this->items[$name] = ($value = $parameter->getValue()) ? $value->getDefault() : false;
        }

        return $this;
    }
439988
public function finalize()
    {
        // Output our chunks.
        // Every output is split into 4 chunk strings (header, messages,
        // data, footer).
        foreach ($this->chunkStrings as $chunkString) {
            // Save everything to the file after we are done.
            $this->pool->chunks->saveDechunkedToFile($chunkString);
        }
    }
510942
public function getLastSavedDraftRevision()
    {
        if (!empty($this->lastSavedDraft)) {
            return $this->lastSavedDraft;
        }

        $published = $this->publishedRevision;
        $staged = $this->stagedRevision;

        $arrayCollection = $this->revisions->toArray();

        /** @var \Rcm\Entity\Revision $revision */
        $revision = end($arrayCollection);

        if (empty($revision)) {
            return null;
        }

        $found = false;

        while (!$found) {
            if (empty($revision)) {
                break;
            } elseif (!empty($published)
                && $published->getRevisionId() == $revision->getRevisionId()
            ) {
                $found = false;
            } elseif (!empty($staged)
                && $staged->getRevisionId() == $revision->getRevisionId()
            ) {
                $found = false;
            } elseif ($revision->wasPublished()) {
                $found = false;
            } else {
                $found = true;
            }

            if (!$found) {
                $revision = prev($arrayCollection);
            }
        }

        return $this->lastSavedDraft = $revision;
    }
11663
public function finalize()
    {
        list($usec, $sec) = explode(' ', microtime());
        $micro = sprintf("%06d", $usec * 1000000);
        $when = new \DateTime(date('Y-m-d H:i:s.' . $micro));
        $when->setTimezone(new \DateTimeZone('UTC'));
        $this->finalTime = $when->format('Y-m-d\TH:i:s.u\Z');
        $this->isFinalState = true;
    }
582127
public function results()
    {
        // Finish all
        $this->finishLastPoint();

        // Finish all multiple points
        $this->finishAllMultiplePoints();

        // Add results to presenter
        $this->presenter->displayResultsTrigger($this->pointStack);

        // Return export
        return $this->export();
    }
1158006
public function getLast()
    {
        $result = $this->table()
            ->where('batch', $this->getLastBatchNumber())
            ->orderBy('mapping', 'desc')
            ->get();

        if (is_array($result)) {
            return $result;
        }

        return $result->toArray();
    }
1184160
public function rankingCupsAction()
    {
        $ranking = $this->getDoctrine()->getRepository('VideoGamesRecordsCoreBundle:Player')->getRankingCups($this->getIdPlayer());
        $breadcrumbs = $this->get('white_october_breadcrumbs');
        $breadcrumbs->addRouteItem('Home', 'homepage');
        $breadcrumbs->addItem('player.cupranking.full');

        return $this->render('VideoGamesRecordsCoreBundle:Ranking:player-cups.html.twig', ['ranking' => $ranking]);
    }
525278
public function finalize()
    {
        $context = $this;

        while(true)
        {
            $body = $context->response->getBody();

            if($body instanceof \Exedra\Runtime\Context)
                $context = $body;
            else
                break;
        }

        return $context;
    }
661022
public function refreshValidationResult()
    {
        if (false === $this->mapperResult->hasErrors()) {
            $validator = Core::get()->getValidatorResolver()
                ->getBaseValidatorConjunction(get_class($this->object));

            $this->validationResult = $validator->validate($this->object);
        }

        return $this;
    }
171664
function (progress, adv) {
  if (progress) {
    var id = progress[0]
      , pos = progress[1]
      , insertM = this.findMatch(id);

    if (!insertM) {
      throw new Error('tournament corrupt: ' + id + ' not found!');
    }

    insertM.p[pos] = adv;
    if (insertM.p[(pos + 1) % 2] === WO) {
      insertM.m = (pos) ? [0, 1] : [1, 0]; // set WO map scores
      return insertM.id; // this id was won by adv on WO, inform
    }
  }
}
1067318
public function reset()
    {
        $this->queryType = null;
        $this->offset = 0;
        $this->limit = null;
        $this->joins = array();
        $this->fields = array();
        $this->fromTable = null;
        $this->wheres = array();
        $this->orderBy = null;
        $this->groupBy = array();
        $this->having = array();
        return $this;
    }
210621
public function getSuccessfullyResults(): ResultCollection
    {
        $successfullyResults = array_filter($this->results, function (Result $result) {
            return $result->isSuccessfully();
        });

        return new self(...$successfullyResults);
    }
297915
public function close()
    {
        unset($this->settings['getrow']);

        if( isset($this->getJavascriptValidationFunction) )
        {
            $this->outputElement .= Inclusion\View::use('JavascriptValidationFunctions', $this->getJavascriptValidationFunction, true, __DIR__ . '/');

            $this->getJavascriptValidationFunction = NULL;
        }

        $this->outputElement .= '</form>' . EOL;

        return $this;
    }
871351
public function reset()
	{
		$this->_select   = array();
		$this->_from     = array();
		$this->_join     = array();
		$this->_where    = array();
		$this->_group_by = array();
		$this->_having   = array();
		$this->_order_by = array();
		$this->_distinct = false;
		$this->_limit     = null;
		$this->_offset    = null;
		$this->_last_join = null;
		$this->_parameters = array();

		return $this;
	}
954052
public function finish()
    {
        unset( $this->part->recipients[$this->section - 1] ); // because one extra recipient is created in parseHeader()
        $this->part->size = $this->size;
        return $this->part;
    }
857515
def complete(self):
        """"""
        if None not in [v for v in self.squares]:
            return True
        if self.winner() is not None:
            return True
        return False