Merge "Add .pipeline/ with dev image variant"
[lhc/web/wiklou.git] / includes / parser / LinkHolderArray.php
index f4856be..5eb799e 100644 (file)
@@ -48,6 +48,7 @@ class LinkHolderArray {
         * 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 );
                }
@@ -275,6 +276,7 @@ class LinkHolderArray {
 
        /**
         * Replace internal links
+        * @suppress SecurityCheck-XSS Gets confused with $entry['pdbk']
         * @param string &$text
         */
        protected function replaceInternal( &$text ) {
@@ -418,6 +420,7 @@ class LinkHolderArray {
        /**
         * Replace interwiki links
         * @param string &$text
+        * @suppress SecurityCheck-XSS Gets confused with $this->interwikis['pdbk']
         */
        protected function replaceInterwiki( &$text ) {
                if ( empty( $this->interwikis ) ) {
@@ -630,8 +633,7 @@ class LinkHolderArray {
         * @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'] ) ) {