wol-soft/php-json-schema-model-generator

View on GitHub
src/Templates/Validator/PropertyDependency.phptpl

Summary

Maintainability
Test Coverage
array_key_exists('{{ property.getName() }}', $modelData) && (static function () use ($modelData, &$missingAttributes) {
    foreach ({{ dependencies }} as $dependency) {
        if (!array_key_exists($dependency, $modelData)) {
            $missingAttributes[] = $dependency;
        }
    }

    return !empty($missingAttributes);
})()