more comments

This commit is contained in:
Shish
2015-09-27 12:38:48 +01:00
parent 80f5a016c2
commit 1ac88e8923
27 changed files with 195 additions and 160 deletions

View File

@ -13,7 +13,12 @@
class NumericScoreSetEvent extends Event {
var $image_id, $user, $score;
public function __construct(/*int*/ $image_id, User $user, /*int*/ $score) {
/**
* @param int $image_id
* @param User $user
* @param int $score
*/
public function __construct($image_id, User $user, $score) {
$this->image_id = $image_id;
$this->user = $user;
$this->score = $score;
@ -168,7 +173,10 @@ class NumericScore extends Extension {
$this->delete_votes_by($event->id);
}
public function delete_votes_by(/*int*/ $user_id) {
/**
* @param int $user_id
*/
public function delete_votes_by($user_id) {
global $database;
$image_ids = $database->get_col("SELECT image_id FROM numeric_score_votes WHERE user_id=?", array($user_id));
@ -290,7 +298,7 @@ class NumericScore extends Extension {
* @param int $user_id
* @param int $score
*/
private function add_vote(/*int*/ $image_id, /*int*/ $user_id, /*int*/ $score) {
private function add_vote($image_id, $user_id, $score) {
global $database;
$database->execute(
"DELETE FROM numeric_score_votes WHERE image_id=:imageid AND user_id=:userid",