$this->fatalError( "Error: Closures cannot be converted to JSON. " .
"Please move your extension function somewhere else."
);
- }
- // check if $func exists in the global scope
- if ( function_exists( $func ) ) {
+ } elseif ( function_exists( $func ) ) {
+ // check if $func exists in the global scope
$this->fatalError( "Error: Global functions cannot be converted to JSON. " .
"Please move your extension function ($func) into a class."
);
$this->fatalError( "Error: Closures cannot be converted to JSON. " .
"Please move the handler for $hookName somewhere else."
);
- }
- // Check if $func exists in the global scope
- if ( function_exists( $func ) ) {
+ } elseif ( function_exists( $func ) ) {
+ // Check if $func exists in the global scope
$this->fatalError( "Error: Global functions cannot be converted to JSON. " .
"Please move the handler for $hookName inside a class."
);
$this->json[$realName] = $value;
}
+ /**
+ * @param string $realName
+ * @param array[] $value
+ */
protected function handleResourceModules( $realName, $value ) {
$defaults = [];
$remote = $this->hasOption( 'skin' ) ? 'remoteSkinPath' : 'remoteExtPath';