Allow to check if a vector or map is empty
commitc7b5209e8276e03775ba436e06534bdda5204646
authorSébastien Santoro <dereckson@espace-win.org>
Thu, 10 Feb 2022 01:34:44 +0000 (10 02:34 +0100)
committerSébastien Santoro <dereckson@espace-win.org>
Thu, 10 Feb 2022 01:38:09 +0000 (10 02:38 +0100)
tree9a3f7ebf57f86be3dfe23ed3bfd4d9395bc1b8b5
parent2982a0e384578e8d0f50add9d8fb910bdb5cb701
Allow to check if a vector or map is empty

Test Plan:
Unit tests provided.

Needed by a Zed site health check:

```
        if ($nonWritableDirs->isEmpty()) {
            // We can write everywhere.
            return true;
        }
```

Reviewers: dereckson

Reviewed By: dereckson

Differential Revision: https://devcentral.nasqueron.org/D2508
src/Collections/BaseCollection.php
src/Collections/HashMap.php
src/Collections/Vector.php
tests/Collections/HashMapTest.php
tests/Collections/VectorTest.php