private function removePropertiesFromSubject(array $subject, array $schema): array
    {
        if (isset($schema['properties']) && \is_array($schema['properties'])) {
            $propertyNames = \array_keys($schema['properties']);
            foreach ($propertyNames as $propertyName) {
                if (isset($subject[$propertyName])) {
                    unset($subject[$propertyName]);
                }
            }
        }
        return $subject;
    }