Some more type hinting via the comments.

This commit is contained in:
jgen 2014-04-25 23:22:34 -04:00
parent 24371d8c34
commit e6b1d514d1

View File

@ -68,7 +68,7 @@ class Image {
/** /**
* Find an image by ID * Find an image by ID
* *
* @param $id * @param int $id
* @return Image * @return Image
*/ */
public static function by_id(/*int*/ $id) { public static function by_id(/*int*/ $id) {
@ -81,7 +81,7 @@ class Image {
/** /**
* Find an image by hash * Find an image by hash
* *
* @param $hash * @param string $hash
* @return Image * @return Image
*/ */
public static function by_hash(/*string*/ $hash) { public static function by_hash(/*string*/ $hash) {
@ -110,8 +110,8 @@ class Image {
/** /**
* Search for an array of images * Search for an array of images
* *
* @param $start * @param int $start
* @param $limit * @param int $limit
* @param array $tags * @param array $tags
* @throws SCoreException * @throws SCoreException
* @return Array * @return Array
@ -423,6 +423,8 @@ class Image {
/** /**
* Set the image's source URL * Set the image's source URL
*
* @param string $new_source
*/ */
public function set_source(/*string*/ $new_source) { public function set_source(/*string*/ $new_source) {
global $database; global $database;
@ -978,6 +980,9 @@ class Image {
class Tag { class Tag {
/** /**
* Remove any excess fluff from a user-input tag * Remove any excess fluff from a user-input tag
*
* @param string $tag
* @return mixed
*/ */
public static function sanitise($tag) { public static function sanitise($tag) {
assert(is_string($tag)); assert(is_string($tag));