code: private function detectCircularDependencies(array $variations)
      {
          $tree = [];
  
          foreach ($variations as $variation) {
              $tree[$variation->getName()] = $this->detectCircular($variations, $variation, [$variation->getName()]);
          }
  
          return $tree;
      }
docs: @param array $variations
  
  @return array
  
  @throws Exception\CircularDependencyException