Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix %TOTALPAGES% caching #175

Merged
merged 10 commits into from
Feb 8, 2025

Fix

3bccb04
Select commit
Loading
Failed to load commit list.
Merged

Fix %TOTALPAGES% caching #175

Fix
3bccb04
Select commit
Loading
Failed to load commit list.
GitHub Advanced Security / Phpmd (reported by Codacy) succeeded Feb 8, 2025 in 4s

5 new alerts

New alerts in code changed by this pull request

  • 2 warnings
  • 3 notes

See annotations below for details.

View all branch alerts.

Annotations

Check notice on line 174 in includes/Query.php

See this annotation in the file changed.

Code scanning / Phpmd (reported by Codacy)

This pattern reports excessively long methods. Note

The method buildAndSelect() has 256 lines of code. Current threshold is set to 100. Avoid really long methods.

Check notice on line 174 in includes/Query.php

See this annotation in the file changed.

Code scanning / Phpmd (reported by Codacy)

This pattern reports methods with a large number of possible paths Note

The method buildAndSelect() has an NPath complexity of 1296000. The configured NPath complexity threshold is 200.

Check notice on line 174 in includes/Query.php

See this annotation in the file changed.

Code scanning / Phpmd (reported by Codacy)

This pattern reports methods with high cyclomatic complexity Note

The method buildAndSelect() has a Cyclomatic Complexity of 30. The configured cyclomatic complexity threshold is 10.

Check warning on line 174 in includes/Query.php

See this annotation in the file changed.

Code scanning / Phpmd (reported by Codacy)

You can fix this problem by extracting the logic in the boolean flag into its own class or method Warning

The method buildAndSelect has a boolean flag argument $calcRows, which is a certain sign of a Single Responsibility Principle violation.

Check warning on line 405 in includes/Query.php

See this annotation in the file changed.

Code scanning / Phpmd (reported by Codacy)

Static access leads to hard to test code Warning

Avoid using static access to class '\Wikimedia\Rdbms\Database' in method 'buildAndSelect'.