typed return arrays too
This commit is contained in:
parent
02da92403a
commit
6a2d3f49e2
9 changed files with 13 additions and 13 deletions
|
@ -132,7 +132,7 @@ class Tag
|
|||
/**
|
||||
* Turn a human-supplied string into a valid tag array.
|
||||
*
|
||||
* #return string[]
|
||||
* @return string[]
|
||||
*/
|
||||
public static function explode(string $tags, bool $tagme = true): array
|
||||
{
|
||||
|
|
|
@ -175,7 +175,7 @@ function stream_file(string $file, int $start, int $end): void
|
|||
# http://www.php.net/manual/en/function.http-parse-headers.php#112917
|
||||
if (!function_exists('http_parse_headers')) {
|
||||
/**
|
||||
* #return string[]
|
||||
* @return string[]
|
||||
*/
|
||||
function http_parse_headers(string $raw_headers): array
|
||||
{
|
||||
|
|
|
@ -448,7 +448,7 @@ class CommentList extends Extension
|
|||
}
|
||||
|
||||
/**
|
||||
* #return Comment[]
|
||||
* @return Comment[]
|
||||
*/
|
||||
private static function get_generic_comments(string $query, array $args): array
|
||||
{
|
||||
|
@ -462,7 +462,7 @@ class CommentList extends Extension
|
|||
}
|
||||
|
||||
/**
|
||||
* #return Comment[]
|
||||
* @return Comment[]
|
||||
*/
|
||||
private static function get_recent_comments(int $count): array
|
||||
{
|
||||
|
@ -480,7 +480,7 @@ class CommentList extends Extension
|
|||
}
|
||||
|
||||
/**
|
||||
* #return Comment[]
|
||||
* @return Comment[]
|
||||
*/
|
||||
private static function get_user_comments(int $user_id, int $count, int $offset = 0): array
|
||||
{
|
||||
|
@ -500,7 +500,7 @@ class CommentList extends Extension
|
|||
|
||||
/**
|
||||
* public just for Image::get_comments()
|
||||
* #return Comment[]
|
||||
* @return Comment[]
|
||||
*/
|
||||
public static function get_comments(int $image_id): array
|
||||
{
|
||||
|
|
|
@ -161,7 +161,7 @@ class DanbooruApi extends Extension
|
|||
* - page: page number
|
||||
* - after_id: limit results to posts added after this id
|
||||
*
|
||||
* #return string
|
||||
* @return string
|
||||
*/
|
||||
private function api_find_posts(): HTMLElement
|
||||
{
|
||||
|
|
|
@ -256,7 +256,7 @@ class Favorites extends Extension
|
|||
}
|
||||
|
||||
/**
|
||||
* #return string[]
|
||||
* @return string[]
|
||||
*/
|
||||
private function list_persons_who_have_favorited(Image $image): array
|
||||
{
|
||||
|
|
|
@ -709,7 +709,7 @@ class Pools extends Extension
|
|||
|
||||
/**
|
||||
* Get all of the pool IDs that an image is in, given an image ID.
|
||||
* #return int[]
|
||||
* @return int[]
|
||||
*/
|
||||
private function get_pool_ids(int $imageID): array
|
||||
{
|
||||
|
@ -759,7 +759,7 @@ class Pools extends Extension
|
|||
/**
|
||||
* Gets the previous and next successive images from a pool, given a pool ID and an image ID.
|
||||
*
|
||||
* #return int[] Array returning two elements (prev, next) in 1 dimension. Each returns ImageID or NULL if none.
|
||||
* @return int[] Array returning two elements (prev, next) in 1 dimension. Each returns ImageID or NULL if none.
|
||||
*/
|
||||
private function get_nav_posts(Pool $pool, int $imageID): ?array
|
||||
{
|
||||
|
|
|
@ -192,7 +192,7 @@ class ReportImage extends Extension
|
|||
}
|
||||
|
||||
/**
|
||||
* #return ImageReport[]
|
||||
* @return ImageReport[]
|
||||
*/
|
||||
public function get_reports(Image $image): array
|
||||
{
|
||||
|
|
|
@ -285,7 +285,7 @@ class ResizeImage extends Extension
|
|||
}
|
||||
|
||||
/**
|
||||
* #return int[]
|
||||
* @return int[]
|
||||
*/
|
||||
private function calc_new_size(Image $image_obj, int $width, int $height): array
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ class WordFilter extends Extension
|
|||
}
|
||||
|
||||
/**
|
||||
* #return string[]
|
||||
* @return string[]
|
||||
*/
|
||||
private function get_map(): array
|
||||
{
|
||||
|
|
Reference in a new issue