Skip to content

Add Assert::emptyArray - #61

Merged
frankdekker merged 3 commits into
masterfrom
Add-assert-empty-array
Jan 19, 2026
Merged

Add Assert::emptyArray#61
frankdekker merged 3 commits into
masterfrom
Add-assert-empty-array

Conversation

@frankdekker

@frankdekker frankdekker commented Jan 17, 2026

Copy link
Copy Markdown
Member

Adds Assert::emptyArray which asserts an value should be of type array and be []

Copilot AI review requested due to automatic review settings January 17, 2026 12:46
@frankdekker
frankdekker requested a review from bram123 January 17, 2026 12:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new Assert::emptyArray method that validates a value is an array and is empty (i.e., []), complementing the existing nonEmptyArray method.

Changes:

  • Added Assert::emptyArray method with proper PHPDoc annotations and error handling
  • Added test cases for both success and failure scenarios
  • Updated README documentation to list the new method

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/Assert.php Implements the new emptyArray assertion method that validates input is an array and contains no elements
tests/Unit/AssertTest.php Adds test cases for the new method covering empty array success case and non-empty array failure case
README.md Adds emptyArray to the list of available assertion methods

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/Unit/AssertTest.php Outdated
@frankdekker
frankdekker force-pushed the Add-assert-empty-array branch from 7407c67 to 3f7b041 Compare January 17, 2026 12:52
@frankdekker
frankdekker merged commit 18448e4 into master Jan 19, 2026
12 checks passed
@frankdekker
frankdekker deleted the Add-assert-empty-array branch January 19, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants