Simplify PHP code

Change-Id: Ia1bd08cd972b2f5792d24d5fbc383c3c63b000db
This commit is contained in:
Fomafix 2023-02-11 20:10:08 +00:00
parent 8bd82c12f6
commit 75c2c5580a

View file

@ -314,15 +314,12 @@ class CategoryTree {
* @return mixed
*/
public function getOptionsAsJsStructure( $depth = null ) {
$opt = $this->mOptions;
if ( $depth !== null ) {
$opt = $this->mOptions;
$opt['depth'] = $depth;
$s = self::encodeOptions( $opt, 'json' );
} else {
$s = self::encodeOptions( $this->mOptions, 'json' );
}
return $s;
return self::encodeOptions( $opt, 'json' );
}
/**