public function checkCircularDependencies()
    {
        $taskConfigurations = $this->getTaskConfigurations();

        foreach ($taskConfigurations as $taskConfiguration) {
            foreach ($taskConfiguration->getPreviousTasksConfigurations() as $previousTaskConfig) {
                if ($taskConfiguration->getCode() === $previousTaskConfig->getCode()) {
                    throw CircularProcessException::create($this->getCode(), $taskConfiguration->getCode());
                }
            }
            if ($taskConfiguration->hasAncestor($taskConfiguration)) {
                throw CircularProcessException::create($this->getCode(), $taskConfiguration->getCode());
            }
        }
    }
public function checkCircularDependencies()
    {
        $taskConfigurations = $this->getTaskConfigurations();

        foreach ($taskConfigurations as $taskConfiguration) {
            foreach ($taskConfiguration->getPreviousTasksConfigurations() as $previousTaskConfig) {
                if ($taskConfiguration->getCode() === $previousTaskConfig->getCode()) {
                    throw CircularProcessException::create($this->getCode(), $taskConfiguration->getCode());
                }
            }
            if ($taskConfiguration->hasAncestor($taskConfiguration)) {
                throw CircularProcessException::create($this->getCode(), $taskConfiguration->getCode());
            }
        }
    }
public function checkCircularDependencies ( ) { $ taskConfigurations = $ this -> getTaskConfigurations ( ) ; foreach ( $ taskConfigurations as $ taskConfiguration ) { foreach ( $ taskConfiguration -> getPreviousTasksConfigurations ( ) as $ previousTaskConfig ) { if ( $ taskConfiguration -> getCode ( ) === $ previousTaskConfig -> getCode ( ) ) { throw CircularProcessException :: create ( $ this -> getCode ( ) , $ taskConfiguration -> getCode ( ) ) ; } } if ( $ taskConfiguration -> hasAncestor ( $ taskConfiguration ) ) { throw CircularProcessException :: create ( $ this -> getCode ( ) , $ taskConfiguration -> getCode ( ) ) ; } } }
Assert the process does not contain circular dependencies

@throws CircularProcessException
Assert the process does not contain circular dependencies