Added some more comments and type hints.

This commit is contained in:
green-ponies (jgen)
2012-02-07 20:05:38 -05:00
parent 9707c1f7ce
commit 5af54bb9e0
3 changed files with 38 additions and 5 deletions

View File

@@ -106,8 +106,10 @@ class Image {
/**
* Search for an array of images
*
* @retval Array
*/
public static function find_images($start, $limit, $tags=array()) {
public static function find_images(/*int*/ $start, /*int*/ $limit, $tags=array()) {
assert(is_numeric($start));
assert(is_numeric($limit));
assert(is_array($tags));
@@ -383,7 +385,7 @@ class Image {
/**
* Set the image's source URL
*/
public function set_source($source) {
public function set_source(/*string*/ $source) {
global $database;
if(empty($source)) $source = null;
if($source != $this->source) {
@@ -392,7 +394,10 @@ class Image {
}
}
/**
* Check if the image is locked.
* @retval bool
*/
public function is_locked() {
return ($this->locked === true || $this->locked == "Y" || $this->locked == "t");
}