Skip to content
This repository was archived by the owner on Nov 27, 2018. It is now read-only.

Commit

Permalink
Refactored entities.
Browse files Browse the repository at this point in the history
Refactored classes in `AbaLookup\Entity` namespace. The location specific classes
are likely no longer needed as we are going to be using a 3rd-party maps/distance
API. Added a UserType enumeration (kinda?) class that holds the types a user can be.
Refactored unit tests to reflect updates to classes.

Also,

- Removed traces of moderator flag until we figure out what that is/will be. (MUNComputerScienceSociety#52)
- Renamed sex to gender. (MUNComputerScienceSociety#63)
- Certificate of Conduct now stored as the date recieved, NULL indicating that it was not recieved. (MUNComputerScienceSociety#93)
- UserType class uses reflection (which is probably a bad idea).
  • Loading branch information
whymarrh committed Oct 12, 2013
1 parent 8e63348 commit 0ca886d
Show file tree
Hide file tree
Showing 16 changed files with 266 additions and 691 deletions.
133 changes: 0 additions & 133 deletions module/AbaLookup/src/AbaLookup/Entity/Location.php

This file was deleted.

10 changes: 7 additions & 3 deletions module/AbaLookup/src/AbaLookup/Entity/Pairing.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class Pairing
protected $score;

/**
* Whether this pairing should be excluded from results
*
* @Column(type = "boolean")
*/
protected $excluded;
Expand All @@ -52,7 +54,7 @@ class Pairing
*
* @param User $a The 1st user in this pairing.
* @param User $a The 2nd user in this pairing.
* @param float $score The score.
* @param float $score The score for this pairing.
* @throws InvalidArgumentException
*/
public function __construct(User $a, User $b, $score)
Expand Down Expand Up @@ -87,9 +89,9 @@ public function setScore($score)
}

/**
* Sets this pairing to be excluded
* Sets whether this pairing is to be excluded from results
*
* @param bool $excluded Whether this pairing should be excluded in future matching.
* @param bool $excluded This pairing should be excluded from results.
* @throws InvalidArgumentException
* @return $this
*/
Expand Down Expand Up @@ -135,6 +137,8 @@ public function getScore()
}

/**
* Returns whether this pairing is being excluded from results
*
* @return bool
*/
public function isExcluded()
Expand Down
Loading

0 comments on commit 0ca886d

Please sign in to comment.