Skip to content

Replace assertEmpty() with strict assertions to fix Static Analyse job - #221

Merged
Soner (shyim) merged 2 commits into
trunkfrom
copilot/fix-static-analyse-job
Oct 15, 2026
Merged

Soner (shyim) merged 2 commits into
trunkfrom
copilot/fix-static-analyse-job

Conversation

Copilot AI commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

The "Static Analyse" CI job fails because PHPStan's strict-assertion rule flags assertEmpty() ("assertEmpty() is not allowed. Use more strict assertion."). Two tests used it.

  • InAppPurchasesControllerTest: assertEmpty($content) becomes assertSame([], $content). validateResponse() returns the JSON-decoded body as an array, so an empty response decodes to [].
  • LicenseControllerTest: assertEmpty($response->getContent()) becomes assertSame('', $response->getContent()). The 204 response should have an empty string body.
// before
static::assertEmpty($response->getContent());
// after
static::assertSame('', $response->getContent());

I haven't run PHPStan or the tests yet. The [] expectation in InAppPurchasesControllerTest is unconfirmed, so a reviewer should check that test passes.

Co-authored-by: shyim <6224096+shyim@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Static Analyse Replace assertEmpty() with strict assertions to fix Static Analyse job Oct 15, 2026
Copilot AI requested a review from Soner (shyim) October 15, 2026 04:46
@shyim
Soner (shyim) marked this pull request as ready for review October 15, 2026 04:50
@shyim
Soner (shyim) merged commit c050030 into trunk Oct 15, 2026
@shyim
Soner (shyim) deleted the copilot/fix-static-analyse-job branch October 15, 2026 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants