Skip to content

Replace empty() with strict comparison in InAppPurchaseCartPositionStruct#148

Merged
Soner (shyim) merged 1 commit intotrunkfrom
copilot/fix-empty-construct-issue
May 4, 2026
Merged

Replace empty() with strict comparison in InAppPurchaseCartPositionStruct#148
Soner (shyim) merged 1 commit intotrunkfrom
copilot/fix-empty-construct-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 3, 2026

PHPStan (via shopware/github-actions/phpstan@main) rejects empty() as insufficiently strict.

Change

Replaced !empty() with an explicit isset + non-empty array check:

// Before
if (!empty($data['subscriptionChange'])) {

// After
if (isset($data['subscriptionChange']) && $data['subscriptionChange'] !== []) {

@shyim Soner (shyim) merged commit a49ab80 into trunk May 4, 2026
6 checks passed
@shyim Soner (shyim) deleted the copilot/fix-empty-construct-issue branch May 4, 2026 05:48
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