Skip to content

Commit

Permalink
Try
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega authored Feb 9, 2025
1 parent d048422 commit 7cd053b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions includes/Lister/Lister.php
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,7 @@ protected function replaceTagParameters( $tag, Article $article ) {
$pageProps = MediaWikiServices::getInstance()->getPageProps();

// Get DisplayTitle
$titleTarget = $article->mTitle->createFragmentTarget( '' );
$values = $pageProps->getProperties( $titleTarget, 'displaytitle' );
$values = $pageProps->getProperties( $article->mTitle, 'displaytitle' );
$id = $titleTarget->getArticleID();

Check warning

Code scanning / Phpmd (reported by Codacy)

Detects when a field, local, or parameter has a very short name. Warning

Avoid variables with short names like $id. Configured minimum length is 3.

Check warning

Code scanning / Phpmd (reported by Codacy)

Detects when a variable is used that has not been defined before Warning

Avoid using undefined variables such as '$titleTarget' which will lead to PHP notices.

Check notice

Code scanning / Phpmd (reported by Codacy)

Prohibit the definition or assignment of unused local variables Note

Avoid unused local variables such as '$titleTarget'.
if ( array_key_exists( $id, $values ) ) {
$value = $values[$id];
Expand Down

0 comments on commit 7cd053b

Please sign in to comment.