public function validateChildClasses()
    {
        if (count($this->childClasses) > 0 && $this->isLeaf) {
            throw new MappingException(sprintf(
                'Cannot map a document as a leaf and define child classes for "%s"',
                $this->name
            ));
        }
    }
public function validateChildClasses()
    {
        if (count($this->childClasses) > 0 && $this->isLeaf) {
            throw new MappingException(sprintf(
                'Cannot map a document as a leaf and define child classes for "%s"',
                $this->name
            ));
        }
    }
public function validateChildClasses ( ) { if ( count ( $ this -> childClasses ) > 0 && $ this -> isLeaf ) { throw new MappingException ( sprintf ( 'Cannot map a document as a leaf and define child classes for "%s"' , $ this -> name ) ) ; } }
Validate that childClasses is empty if isLeaf is true.

@throws MappingException if there is a conflict between isLeaf and childClasses.
Validate that childClasses is empty if isLeaf is true .