private function isPatternValid(array $pattern, array $values, $parentPath)
{
if (is_array($pattern)) {
$notExistingKeys = array_diff_key($pattern, $values);
if (count($notExistingKeys) > 0) {
$keyNames = array_keys($notExistingKeys);
$path = $this->formatFullPath($parentPath, $this->formatAccessPath($keyNames[0]));
$this->setMissingElementInError('value', $path);
return false;
}
}
return true;
}