* Reduce memory usage to reduce the impact of circular references
*/
public function __destruct() {
+ // @phan-suppress-next-line PhanTypeSuspiciousNonTraversableForeach
foreach ( $this as $name => $value ) {
unset( $this->$name );
}
* @private
*/
public function replaceTextCallback( $matches ) {
- $type = $matches[1];
- $key = $matches[2];
+ list( , $type, $key ) = $matches;
if ( $type == 'LINK' ) {
list( $ns, $index ) = explode( ':', $key, 2 );
if ( isset( $this->internals[$ns][$index]['text'] ) ) {