Example #1
0
 /**
  * Calculates the coupling between the given types.
  *
  * @param PHP_Depend_Code_AbstractType $declaringType The declaring type
  *        or the context type.
  * @param PHP_Depend_Code_AbstractType $coupledType   The type that is used
  *        by the declaring type or <b>null</b> when no type is defined.
  *
  * @return void
  * @since 0.10.2
  */
 private function _calculateCoupling(PHP_Depend_Code_AbstractType $declaringType, PHP_Depend_Code_AbstractType $coupledType = null)
 {
     $this->_initDependencyMap($declaringType);
     if (null === $coupledType) {
         return;
     }
     if ($coupledType->isSubtypeOf($declaringType) || $declaringType->isSubtypeOf($coupledType)) {
         return;
     }
     $this->_initDependencyMap($coupledType);
     $this->_dependencyMap[$declaringType->getUUID()]['ce'][$coupledType->getUUID()] = true;
     $this->_dependencyMap[$coupledType->getUUID()]['ca'][$declaringType->getUUID()] = true;
 }