diff options
author | Timo Tijhof <krinkle@fastmail.com> | 2022-09-28 21:39:23 +0100 |
---|---|---|
committer | Timo Tijhof <krinkle@fastmail.com> | 2022-10-13 19:21:13 +0100 |
commit | 06245f3f4f570156b42dad0968688dc6935935d6 (patch) | |
tree | 1ceb808522ac913bfd3c564f74e418efdea00130 /includes/ExtensionInfo.php | |
parent | d96207ab86862b37c08e7d89506ad949d8860ae4 (diff) | |
download | mediawikicore-06245f3f4f570156b42dad0968688dc6935935d6.tar.gz mediawikicore-06245f3f4f570156b42dad0968688dc6935935d6.zip |
SpecialVersion: Clean up count(), early return, strict types
* Remove some use of `count()` in favour of boolean checks.
* Where trivial to do, add native return types to remove doubt
of the value possibly not being an array.
* Follow-up I7d97a4cdc9 (d4df7daa) and mark more methods as private
that were wrongly marked public en-mass when we added visibility
attributes but have no use outside core on a SpecialPage class that
generally has no use case for being extended or instantiated
outside core.
Change-Id: Iaf28b6132097fe34872c2a2da374ff00593ca6a9
Diffstat (limited to 'includes/ExtensionInfo.php')
-rw-r--r-- | includes/ExtensionInfo.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/includes/ExtensionInfo.php b/includes/ExtensionInfo.php index a24d1d786f8e..cdb30b69a90b 100644 --- a/includes/ExtensionInfo.php +++ b/includes/ExtensionInfo.php @@ -38,13 +38,11 @@ class ExtensionInfo { /** * Obtains the full paths of COPYING or LICENSE files if they exist. * - * @param string $extDir Path to the extensions root directory - * * @since 1.35 - * + * @param string $extDir Path to the extensions root directory * @return string[] Returns an array of zero or more paths. */ - public static function getLicenseFileNames( $extDir ) { + public static function getLicenseFileNames( string $extDir ): array { if ( !$extDir ) { return []; } |