for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace AppBundle\Utils;
use AppBundle\Entity\{
Choice, Poll
};
use Doctrine\Common\Persistence\ManagerRegistry;
class ElectionManager
{
private $doctrineRegistry;
/**
* Constructor.
*
* @param \Doctrine\Common\Persistence\ManagerRegistry $doctrineRegistry
*/
public function __construct(ManagerRegistry $doctrineRegistry)
$this->doctrineRegistry = $doctrineRegistry;
}
public function isElection(Poll $poll): boolean
$poll
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return false;
public function getEligibleVoters(): array
return [];
public function calculateElectionResult(Poll $poll): array
return $this->getElectionResults($poll);
public function getElectionResults(Poll $poll): array
public function submitVotes(array $choices)
$choices
return;
public function getElectionPollVotes(Poll $poll): array
public function getElectionWinner(Poll $poll): Choice
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.