public function getCandidateIds(): array
    {
        $candidateIds = [];

        foreach ($this->candidates as $candidate) {
            $candidateIds[] = $candidate->getId();
        }

        return $candidateIds;
    }
public function getCandidateIds(): array
    {
        $candidateIds = [];

        foreach ($this->candidates as $candidate) {
            $candidateIds[] = $candidate->getId();
        }

        return $candidateIds;
    }
public function getCandidateIds ( ) : array { $ candidateIds = [ ] ; foreach ( $ this -> candidates as $ candidate ) { $ candidateIds [ ] = $ candidate -> getId ( ) ; } return $ candidateIds ; }
Get an array of candidate ids.

@return int[]
Get an array of candidate ids .