aboutsummaryrefslogtreecommitdiffstats
path: root/includes/resourceloader/ResourceLoaderFileModule.php
diff options
context:
space:
mode:
authorUmherirrender <umherirrender_de.wp@web.de>2021-02-10 23:31:02 +0100
committerUmherirrender <umherirrender_de.wp@web.de>2021-02-11 00:13:52 +0000
commit8de3b7d324a2650c4c8d603738f0b92f04f33367 (patch)
tree33c0834bfff0c4878c9a31805db02de411de2d23 /includes/resourceloader/ResourceLoaderFileModule.php
parent077b84664db0fa866abfd44c03b650e0048a3db8 (diff)
downloadmediawikicore-8de3b7d324a2650c4c8d603738f0b92f04f33367.tar.gz
mediawikicore-8de3b7d324a2650c4c8d603738f0b92f04f33367.zip
Use static closures where safe to use
This is micro-optimization of closure code to avoid binding the closure to $this where it is not needed. Created by I25a17fb22b6b669e817317a0f45051ae9c608208 Change-Id: I0ffc6200f6c6693d78a3151cb8cea7dce7c21653
Diffstat (limited to 'includes/resourceloader/ResourceLoaderFileModule.php')
-rw-r--r--includes/resourceloader/ResourceLoaderFileModule.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php
index 24e55ff9fa66..a9c67c7046a5 100644
--- a/includes/resourceloader/ResourceLoaderFileModule.php
+++ b/includes/resourceloader/ResourceLoaderFileModule.php
@@ -638,7 +638,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
// 'getFileHashes' method tracks their content already.
// It is important that the keys of the $packageFiles['files'] array
// are preserved, as they do affect the module output.
- $packageFiles['files'] = array_map( function ( $fileInfo ) {
+ $packageFiles['files'] = array_map( static function ( $fileInfo ) {
return $fileInfo['definitionSummary'] ?? ( $fileInfo['content'] ?? null );
}, $packageFiles['files'] );
}