validateChildClasses() public method

Validate that childClasses is empty if isLeaf is true.
 /**
  * Validate runtime metadata is correctly defined.
  *
  * @param ClassMetadata $class
  * @param $parent
  * @throws MappingException
  */
 protected function validateRuntimeMetadata($class, $parent)
 {
     if (!$class->reflClass) {
         // only validate if there is a reflection class instance
         return;
     }
     $class->validateIdentifier();
     $class->validateReferenceable();
     $class->validateReferences();
     $class->validateChildClasses();
     $class->validateLifecycleCallbacks($this->getReflectionService());
     $class->validateTranslatables();
     // verify inheritance
     // TODO
 }