Methods Stats

Result->getStats()

Format & Content

The format and nature of the statistics returned depends on the voting method used. And are more likely to be documented on their dedicated documentation.

$election->getResult()->getStats();

Verbosity

They can be very large and take a lot of space, because they are stored in the Result object. For this reason, different levels of verbosity can be implemented by the voting methods. By default, the standard level is used. The verbosity of a Result object is immmutable.

Verbosity level us the enum StatsVerbosity.

Election->setStatsVerbosity() Election->getStatsVerbosity()

use \CondorcetPHP\Condorcet\Algo\StatsVerbosity;

$election->getStatsVerbosity(); // StatsVerbosity::STD

$election->setStatsVerbosity(StatsVerbosity::FULL);
$result = $election->getResult('Kemeny Young');

$election->getStatsVerbosity(); // StatsVerbosity::FULL
$result->statsVerbosity; // StatsVerbosity::FULL