ProtectionForm: Add type hint to ::showLogExtract() header
authorDerick Alangi <alangiderick@gmail.com>
Sun, 10 Mar 2019 18:12:48 +0000 (19:12 +0100)
committerDerick Alangi <alangiderick@gmail.com>
Sun, 10 Mar 2019 18:12:48 +0000 (19:12 +0100)
https://codesearch.wmflabs.org/core/?q=showLogExtract%5C(&i=nope&files=&repos=
according to codesearch shows that this method takes as first argument an output
page object and also, objects are passed by reference by default so removed &.

Change-Id: I167ae6300b37d4e9292bd8ad14351f1ca35184d2

includes/ProtectionForm.php

index 6ce7ef4..0e18e46 100644 (file)
@@ -622,10 +622,10 @@ class ProtectionForm {
        /**
         * Show protection long extracts for this page
         *
-        * @param OutputPage &$out
+        * @param OutputPage $out
         * @private
         */
-       function showLogExtract( &$out ) {
+       function showLogExtract( OutputPage $out ) {
                # Show relevant lines from the protection log:
                $protectLogPage = new LogPage( 'protect' );
                $out->addHTML( Xml::element( 'h2', null, $protectLogPage->getName()->text() ) );