Skip to content

Drop the impossible false check on ini_get('max_execution_time') - #167

Merged
PDowney merged 1 commit into
mainfrom
psalm-ini-get
Nov 25, 2026
Merged

PDowney merged 1 commit into
mainfrom
psalm-ini-get

Conversation

@PDowney

@PDowney PDowney commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Summary

The Psalm job installs the newest dependencies. Since Psalm 7.19 it fails on main's code, as it does on #166:

includes/helpers.php:287:7: TypeDoesNotContainType: string does not contain false

PHP always defines max_execution_time, so ini_get( 'max_execution_time' ) returns a string and never false. This removes that branch. The empty-string and is_numeric() checks after it still return 30 for any unusable value, so the behavior is unchanged.

Testing

  • Psalm 7.19 (the CI job's version) reports no errors; the locked Psalm 7.12 passes too.
  • composer check-all (PHPCS, PHPMD, Psalm, PHPStan, Rector, 230 PHPUnit tests) and Plugin Check on the file pass.

🤖 Generated with Claude Code

PHP always defines max_execution_time, so ini_get() returns a string for
it and never false. Psalm 7.19, which the CI job that installs the newest
dependencies now gets, rejects the check as TypeDoesNotContainType; the
empty-string and is_numeric() checks below still cover every value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codacy-production

codacy-production Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

🟢 Coverage ∅ diff coverage · +0.02% coverage variation

Metric Results
Coverage variation ✅ +0.02% coverage variation (-1.00%)
Diff coverage ✅ ∅ diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (deeb438) 2614 534 20.43%
Head commit (ced6ed6) 2612 (-2) 534 (+0) 20.44% (+0.02%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#167) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for contributing to EngineScript Site Exporter!

Before we review:

  • Have you tested your changes with WordPress 7.0+?
  • Are your changes compatible with PHP 8.3+?
  • Have you followed WordPress coding standards?
  • Did you update the CHANGELOG.md if needed?

Security Reminder
This plugin creates site export archives, so please ensure:

  • All user input is properly sanitized
  • All output is properly escaped
  • No security vulnerabilities are introduced

We'll review your PR soon.

@PDowney
PDowney merged commit 3fca069 into main Nov 25, 2026
31 checks passed
@github-actions
github-actions Bot deleted the psalm-ini-get branch November 25, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant