Fix phpcs errors in includes/
[lhc/web/wiklou.git] / includes / changes / OldChangesList.php
index b779a02..4ce564d 100644 (file)
@@ -32,7 +32,6 @@ class OldChangesList extends ChangesList {
         * @return string|bool
         */
        public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
-               wfProfileIn( __METHOD__ );
 
                $classes = array();
                // use mw-line-even/mw-line-odd class only if linenumber is given (feature from bug 14468)
@@ -49,21 +48,17 @@ class OldChangesList extends ChangesList {
                $classes[] = $watched && $rc->mAttribs['rc_timestamp'] >= $watched
                        ? 'mw-changeslist-line-watched' : 'mw-changeslist-line-not-watched';
 
-               $html = $this->formatChangeLine( $rc, $watched );
+               $html = $this->formatChangeLine( $rc, $classes, $watched );
 
                if ( $this->watchlist ) {
                        $classes[] = Sanitizer::escapeClass( 'watchlist-' .
                                $rc->mAttribs['rc_namespace'] . '-' . $rc->mAttribs['rc_title'] );
                }
 
-               if ( !wfRunHooks( 'OldChangesListRecentChangesLine', array( &$this, &$html, $rc, &$classes ) ) ) {
-                       wfProfileOut( __METHOD__ );
-
+               if ( !Hooks::run( 'OldChangesListRecentChangesLine', array( &$this, &$html, $rc, &$classes ) ) ) {
                        return false;
                }
 
-               wfProfileOut( __METHOD__ );
-
                $dateheader = ''; // $html now contains only <li>...</li>, for hooks' convenience.
                $this->insertDateHeader( $dateheader, $rc->mAttribs['rc_timestamp'] );
 
@@ -72,11 +67,12 @@ class OldChangesList extends ChangesList {
 
        /**
         * @param RecentChange $rc
-        * @param boolean $watched
+        * @param string[] &$classes
+        * @param bool $watched
         *
         * @return string
         */
-       private function formatChangeLine( RecentChange $rc, $watched ) {
+       private function formatChangeLine( RecentChange $rc, array &$classes, $watched ) {
                $html = '';
 
                if ( $rc->mAttribs['rc_log_type'] ) {