foreach ($this->fields as $fieldName => $field) {
// the XmlFileLoader and YamlFileLoader pass the field Optional
// and Required constraint as an array with exactly one element
- if (is_array($field) && count($field) == 1) {
+ if (is_array($field) && 1 == count($field)) {
$this->fields[$fieldName] = $field = $field[0];
}