Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove party cohort code. #1755

Merged
merged 4 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions classes/Member.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,6 @@ public function isDead() {

}


/**
* Cohort Key
*
* Gets a key that defines the periods and party a member should be compared against
*
* @return string of party and entry dates
*/

public function cohortKey($house = HOUSE_TYPE_COMMONS) {
// get the hash_id for the cohort this member belongs to
$person_id = $this->person_id();
return PartyCohort::getHashforPerson($person_id);
}

public function cohortPartyComparisonDirection() {
// Is this MP and their cohort compared against the
// first or last party they have?
Expand Down Expand Up @@ -143,8 +128,10 @@ public function cohortParty($house = HOUSE_TYPE_COMMONS){
$party = $row["party"];
if ( $party == 'Labour/Co-operative' ) {
$party = 'Labour';
} elseif ($party == 'Sinn Féin') {
$party = 'Sinn Fein';
}
return $party;
return slugify($party);
} else {
return null;
}
Expand Down
Loading
Loading