Closed abacaphiliac closed 7 years ago
All $values
are mixed.
It is upto the assertion to validate the type.
I'm also thinking propertiesExist
should be deprecated in favour of the default allPropertyExists
method.
i had to update the second param ($properties) of propertiesExist
from mixed to array, not $value/$values. $properties is an array of property names. never a single property.
normally i wouldn't blend two things like this into a single request, but when i ran the doc generator script the docs for propertiesExist
were updated also, and i think incorrectly. changing properties to array seems correct per the functionality and ensures that there are no errant changes to the docs.
regarding deprecation, i think the names of propertyExists
and propertiesExist
are too similar and leads to confusion.
propertyExists
allows you to assert that a single object has a single property, while allPropertyExists
allows you to assert that multiple objects all have a single property.
propertiesExist
allows you to assert that a single object has multiple properties, while allPropertiesExists
allows you to assert that multiple objects all have multiple properties.
With regard to the 'mixed'=>'array' docblock correction, I've done that manually.
@rquadling thank you for fixing that. sorry for lumping that into this thread : )
No problem.
Can you cast your eye over https://github.com/beberlei/assert/pull/219.
i agree with the changes in #219
i had to update the doc-block on
propertiesExist
so that the generated docs for that method were not incorrectly updated tomixed
.