Skip to content

Fix various phpstan issues#810

Merged
masteradhoc merged 9 commits intoWordPress:masterfrom
masteradhoc:phpstan-fixes
Feb 25, 2026
Merged

Fix various phpstan issues#810
masteradhoc merged 9 commits intoWordPress:masterfrom
masteradhoc:phpstan-fixes

Conversation

@masteradhoc
Copy link
Collaborator

@masteradhoc masteradhoc commented Feb 23, 2026

Related: #803

What?

This PR resolves the resulting type safety issues in the backup codes and TOTP providers.

Why?

Raising PHPStan success rate across the plugin.

Testing Instructions

  1. Run static analysis
  2. apply patch
  3. run static analysis again
  4. do functionality tests

Screenshots or screencast

Changelog Entry

Changed - Correct return docs, sanitize time‑step calculations, and improve argument handling.

@github-actions
Copy link

github-actions bot commented Feb 23, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: masteradhoc <masteradhoc@git.wordpress.org>
Co-authored-by: georgestephanis <georgestephanis@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@masteradhoc masteradhoc added this to the 0.16.0 milestone Feb 23, 2026
@masteradhoc masteradhoc marked this pull request as draft February 23, 2026 21:47
@masteradhoc masteradhoc self-assigned this Feb 24, 2026
@masteradhoc masteradhoc changed the title Improve PHPStan Level to 3 and fix various phpstan issues Fix various phpstan issues Feb 24, 2026
@masteradhoc masteradhoc marked this pull request as ready for review February 24, 2026 18:41
@jeffpaul jeffpaul moved this from Backlog to In review in Two Factor project board Feb 24, 2026
@masteradhoc masteradhoc merged commit df7541f into WordPress:master Feb 25, 2026
29 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Two Factor project board Feb 25, 2026
@masteradhoc masteradhoc deleted the phpstan-fixes branch February 25, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants