uuid
uuid copied to clipboard
Allow static guid calls
Allow static calls to Guid::uuid4() and others
see https://github.com/ramsey/uuid/issues/306
Maybe that's not the very best approach, but it should do the trick.
If you don't like this and want to block static calls on Guid instead, maybe you should also consider removing (or deprecating for now) those static methods from Uuid class as well. To me this would be kind of weird to have Uuid::uuid4() allowed but Guid::uuid4() not. If you have to go through the UuidFactory to create those, this should be the case for all then.
I'm giving more thought to this. At first, I wanted to restrict calls to these static methods on the inheriting classes, but I'm giving this a second thought and will let you know soon. Thanks!
Codecov Report
Merging #307 (bd43e91) into 4.x (01433b5) will decrease coverage by
0.11%
. The diff coverage is88.23%
.
@@ Coverage Diff @@
## 4.x #307 +/- ##
============================================
- Coverage 95.53% 95.42% -0.12%
- Complexity 554 557 +3
============================================
Files 64 64
Lines 1479 1485 +6
============================================
+ Hits 1413 1417 +4
- Misses 66 68 +2
Impacted Files | Coverage Δ | |
---|---|---|
src/Guid/Guid.php | 75.00% <66.66%> (-25.00%) |
:arrow_down: |
src/Uuid.php | 96.51% <100.00%> (ø) |