code: public function acceptsAnotherChild(ModelInterface $model, ModelCollector $collector)
      {
          $conditionType = $model->getProperty('type');
          if (!$this->conditionFactory->supportsNesting($conditionType)) {
              return false;
          }
          if (-1 === ($max = $this->conditionFactory->maxChildren($conditionType))) {
              return true;
          }
  
          return \count($collector->collectDirectChildrenOf($model)) < $max;
      }
docs: Test if a model accepts another child.
  
  @param ModelInterface $model     The model that shall be checked.
  @param ModelCollector $collector The collector to use.
  
  @return bool