Use non-empty-string instead of string for Provider properties #232
Use non-empty-string instead of string for Provider properties #232westonruter wants to merge 1 commit intotrunkfrom
non-empty-string instead of string for Provider properties #232Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #232 +/- ##
=========================================
Coverage 88.12% 88.12%
Complexity 1213 1213
=========================================
Files 60 60
Lines 3934 3934
=========================================
Hits 3467 3467
Misses 467 467
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The
non-empty-stringis a more specific type thanstring. It's clear that this is the intended type. For example, aProviderMetadataconstructor throws an exception if an empty string is provided:!preg_match('/^[a-z0-9\-_]+$/', $id).This addresses some issues uncovered in WordPress/wordpress-develop#11701.