diff options
author | Timo Tijhof <krinklemail@gmail.com> | 2020-06-14 19:40:02 +0100 |
---|---|---|
committer | Timo Tijhof <krinklemail@gmail.com> | 2020-07-02 03:05:59 +0100 |
commit | 91c73f6bac9922925883937fa1279d42c22dd429 (patch) | |
tree | 590488cef25b32e2c98bc954df0d86c4bdd009f3 /includes/resourceloader/ResourceLoaderMwUrlModule.php | |
parent | 3b3027a6e1399ea41ec7bede3d42c784f81d3418 (diff) | |
download | mediawikicore-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/ResourceLoaderMwUrlModule.php')
-rw-r--r-- | includes/resourceloader/ResourceLoaderMwUrlModule.php | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/includes/resourceloader/ResourceLoaderMwUrlModule.php b/includes/resourceloader/ResourceLoaderMwUrlModule.php index a7f1fdb46747..b319c3caac29 100644 --- a/includes/resourceloader/ResourceLoaderMwUrlModule.php +++ b/includes/resourceloader/ResourceLoaderMwUrlModule.php @@ -23,9 +23,7 @@ * @internal */ class ResourceLoaderMwUrlModule { - /** - * @internal * @param string $content JavaScript RegExp content with additional whitespace * and named capturing group allowed, which will be stripped. * @return string JavaScript code |