src/PeekAndPoke/Aviator/ServiceContainer/DomainModel/ContainerDefinition.php
public function addServiceDefinition(ServiceDefinition $definition) : ContainerDefinition
    {
        $id = $definition->getId();

        if (empty($id)) {
            throw  new \LogicException("The service id defined on class '{$definition->getClass()}' must not be empty");
        }

        if (! isset($this->services[$id])) {
            $this->services[$id] = new ServiceDefinitionQueue();
        }

        $this->services[$id]->append($definition);

        return $this;
    }
public function addServiceDefinition(ServiceDefinition $definition) : ContainerDefinition
    {
        $id = $definition->getId();

        if (empty($id)) {
            throw  new \LogicException("The service id defined on class '{$definition->getClass()}' must not be empty");
        }

        if (! isset($this->services[$id])) {
            $this->services[$id] = new ServiceDefinitionQueue();
        }

        $this->services[$id]->append($definition);

        return $this;
    }
public function addServiceDefinition ( ServiceDefinition $ definition ) : ContainerDefinition { $ id = $ definition -> getId ( ) ; if ( empty ( $ id ) ) { throw new \ LogicException ( "The service id defined on class '{$definition->getClass()}' must not be empty" ) ; } if ( ! isset ( $ this -> services [ $ id ] ) ) { $ this -> services [ $ id ] = new ServiceDefinitionQueue ( ) ; } $ this -> services [ $ id ] -> append ( $ definition ) ; return $ this ; }
@param ServiceDefinition $definition

@return ContainerDefinition
@param ServiceDefinition $definition