From: Thiemo Kreuz Date: Wed, 22 May 2019 11:37:12 +0000 (+0200) Subject: Make some array type hints more specific X-Git-Tag: 1.34.0-rc.0~1633^2 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=f0d5dceb2cc6a83fb105aa7586fbc1e23b02d70f;p=lhc%2Fweb%2Fwiklou.git Make some array type hints more specific Change-Id: Ia9ed6fa851316baa47e73d9a5988a863d15f298c --- diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index 6f6887bfa3..0c1e5cb031 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -192,7 +192,7 @@ class ChangesList extends ContextSource { * @param RecentChange|RCCacheEntry $rc * @param string|bool $watched Optionally timestamp for adding watched class * - * @return array of classes + * @return string[] List of CSS class names */ protected function getHTMLClasses( $rc, $watched ) { $classes = [ self::CSS_CLASS_PREFIX . 'line' ]; diff --git a/includes/media/BitmapHandler.php b/includes/media/BitmapHandler.php index 2d1c3b2b51..e07b16610d 100644 --- a/includes/media/BitmapHandler.php +++ b/includes/media/BitmapHandler.php @@ -110,7 +110,7 @@ class BitmapHandler extends TransformationalImageHandler { * Get ImageMagick subsampling factors for the target JPEG pixel format. * * @param string $pixelFormat one of 'yuv444', 'yuv422', 'yuv420' - * @return array of string keys + * @return string[] List of sampling factors */ protected function imageMagickSubsampling( $pixelFormat ) { switch ( $pixelFormat ) { diff --git a/includes/resourceloader/ResourceLoaderModule.php b/includes/resourceloader/ResourceLoaderModule.php index aca5c73c2b..53ed133be2 100644 --- a/includes/resourceloader/ResourceLoaderModule.php +++ b/includes/resourceloader/ResourceLoaderModule.php @@ -182,7 +182,7 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface { /** * Takes named templates by the module and returns an array mapping. * - * @return array of templates mapping template alias to content + * @return string[] Array of templates mapping template alias to content */ public function getTemplates() { // Stub, override expected. diff --git a/includes/specials/forms/PreferencesFormOOUI.php b/includes/specials/forms/PreferencesFormOOUI.php index 8358cd2bf3..9b86812dfa 100644 --- a/includes/specials/forms/PreferencesFormOOUI.php +++ b/includes/specials/forms/PreferencesFormOOUI.php @@ -195,7 +195,7 @@ class PreferencesFormOOUI extends OOUIHTMLForm { /** * Get the keys of each top level preference section. - * @return array of section keys + * @return string[] List of section keys */ function getPreferenceSections() { return array_keys( array_filter( $this->mFieldTree, 'is_array' ) ); diff --git a/includes/watcheditem/WatchedItemQueryService.php b/includes/watcheditem/WatchedItemQueryService.php index 30e3cbee0e..b134bfe13c 100644 --- a/includes/watcheditem/WatchedItemQueryService.php +++ b/includes/watcheditem/WatchedItemQueryService.php @@ -132,7 +132,7 @@ class WatchedItemQueryService { * id fields ('rc_cur_id', 'rc_this_oldid', 'rc_last_oldid') * if false (default) * @param array|null &$startFrom Continuation value: [ string $rcTimestamp, int $rcId ] - * @return array of pairs ( WatchedItem $watchedItem, string[] $recentChangeInfo ), + * @return array[] Array of pairs ( WatchedItem $watchedItem, string[] $recentChangeInfo ), * where $recentChangeInfo contains the following keys: * - 'rc_id', * - 'rc_namespace',