aboutsummaryrefslogtreecommitdiffstats
path: root/includes/resourceloader/ResourceLoaderFileModule.php
diff options
context:
space:
mode:
authorTimo Tijhof <krinklemail@gmail.com>2020-06-14 19:40:02 +0100
committerTimo Tijhof <krinklemail@gmail.com>2020-07-02 03:05:59 +0100
commit91c73f6bac9922925883937fa1279d42c22dd429 (patch)
tree590488cef25b32e2c98bc954df0d86c4bdd009f3 /includes/resourceloader/ResourceLoaderFileModule.php
parent3b3027a6e1399ea41ec7bede3d42c784f81d3418 (diff)
downloadmediawikicore-91c73f6bac9922925883937fa1279d42c22dd429.tar.gz
mediawikicore-91c73f6bac9922925883937fa1279d42c22dd429.zip
resourceloader: Add some typehints and misc clean up
* Add a void return hint to methods that are not meant to return anything. This helps catch accidental return statements in the future, lets Phan better understand how methods are meant to be used, and might also allow PHP to better optimise the compiled code form (speculation). I did not, however, add it to publicly extended methods as that might mess with strict mode. * Remove the internal getResourceLoader() method from MessageBlobStore. This has been redundant since 3edaa0b37c1e2684. The method was protected, and not considered stable to subclass for extensions. Hence not a breaking change. * Add Throwable typehint to formatException() and friends. This is the narrowest one I could add given that the methods called from here already enforce the same typehint. Update the doc to match for now. There isn't a reason right now to limit this only to Exception, and given this is the method and not the catch statement itself, does not change behaviour. * Remove unused ResourceLoader->getHookContainer(). Added within 1.35 cycle, safe to remove. * Remove unexpected `@since` for `@internal` getHookRunner(). * Remove redundant `@internal` from ResourceLoaderMwUrlModule methods, which itself is already `@internal`. Change-Id: I68d33ff6feca7ef95282a7ff03eb9332adfde31c
Diffstat (limited to 'includes/resourceloader/ResourceLoaderFileModule.php')
-rw-r--r--includes/resourceloader/ResourceLoaderFileModule.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php
index 4fe399f4d74a..2dd5eac80bef 100644
--- a/includes/resourceloader/ResourceLoaderFileModule.php
+++ b/includes/resourceloader/ResourceLoaderFileModule.php
@@ -37,7 +37,6 @@ use MediaWiki\MediaWikiServices;
* @since 1.17
*/
class ResourceLoaderFileModule extends ResourceLoaderModule {
-
/** @var string Local base path, see __construct() */
protected $localBasePath = '';
@@ -178,7 +177,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
protected $missingLocalFileRefs = [];
/**
- * @var VueComponentParser Lazy-created by getVueComponentParser()
+ * @var VueComponentParser|null Lazy-created by getVueComponentParser()
*/
protected $vueComponentParser = null;