Closed Quarkay closed 9 months ago
๐ฏ Main theme: Bug fix
๐ PR summary: Attempt to fix a bug causing a TypeError by replacing new self()
with new static()
in base class methods.
๐ Type of PR: Bug fix
๐งช Relevant tests added: True
โฑ๏ธ Estimated effort to review [1-5]: 2, because the changes are straightforward and limited to a few files.
๐ Security concerns: No security concerns found
๐ก General suggestions: The bug fix seems appropriate and the added tests provide good coverage. However, it would be helpful to include a brief explanation in the PR description about why new static()
is more appropriate than new self()
in this context.
๐ค Code feedback:
relevant file: src/Model/Suppression/Bounce/Bounce.php
suggestion: Consider removing the private constructor since it is no longer necessary. [medium]
relevant line: final private function __construct()
relevant file: src/Model/Suppression/Complaint/Complaint.php
suggestion: Consider removing the private constructor since it is no longer necessary. [medium]
relevant line: final private function __construct()
relevant file: src/Model/Suppression/Unsubscribe/Unsubscribe.php
suggestion: Consider removing the private constructor since it is no longer necessary. [medium]
relevant line: final private function __construct()
relevant file: src/Model/Suppression/Whitelist/DeleteResponse.php
suggestion: Consider using new static()
instead of new self()
in the create
method. [important]
relevant line: - $model = new static()
Attempt to fix issue #878 and added simple test for validation.
Particularly, for
final class DeleteResponse
, replaced 'new static()' with the more appropriate 'new self()', since it's a final class.