summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'MLEB/Translate/ffs/FlatPhpFFS.php')
-rw-r--r--MLEB/Translate/ffs/FlatPhpFFS.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/MLEB/Translate/ffs/FlatPhpFFS.php b/MLEB/Translate/ffs/FlatPhpFFS.php
index 4620ba5a..f0eeef96 100644
--- a/MLEB/Translate/ffs/FlatPhpFFS.php
+++ b/MLEB/Translate/ffs/FlatPhpFFS.php
@@ -37,7 +37,7 @@ class FlatPhpFFS extends SimpleFFS implements MetaYamlSchemaExtender {
foreach ( $matches as $_ ) {
$legal = Title::legalChars();
$key = preg_replace_callback( "/([^$legal]|\\\\)/u",
- function ( $m ) {
+ static function ( $m ) {
return '\x' . dechex( ord( $m[0] ) );
},
$_[1]
@@ -55,12 +55,7 @@ class FlatPhpFFS extends SimpleFFS implements MetaYamlSchemaExtender {
}
protected function writeReal( MessageCollection $collection ) {
- if ( isset( $this->extra['header'] ) ) {
- $output = $this->extra['header'];
- } else {
- $output = "<?php\n";
- }
-
+ $output = $this->extra['header'] ?? "<?php\n";
$output .= $this->doHeader( $collection );
$mangler = $this->group->getMangler();