original_string: protected function removeDependedAliases($alias, $id)
      {
          foreach ($this->ids[$id] as $otherAlias) {
              if (isset($this->aliases[$otherAlias]) && $this->aliases[$otherAlias] === $alias) {
                  unset($this->aliases[$otherAlias]);
                  $aliases = &$this->ids[$id];
                  unset($aliases[array_search($otherAlias, $aliases, true)]);
                  if (!empty($aliases)) {
                      $this->removeDependedAliases($otherAlias, $id);
                  } else {
                      unset($this->ids[$id]);
                  }
              }
          }
      }
code: protected function removeDependedAliases($alias, $id)
      {
          foreach ($this->ids[$id] as $otherAlias) {
              if (isset($this->aliases[$otherAlias]) && $this->aliases[$otherAlias] === $alias) {
                  unset($this->aliases[$otherAlias]);
                  $aliases = &$this->ids[$id];
                  unset($aliases[array_search($otherAlias, $aliases, true)]);
                  if (!empty($aliases)) {
                      $this->removeDependedAliases($otherAlias, $id);
                  } else {
                      unset($this->ids[$id]);
                  }
              }
          }
      }
code_tokens: protected function removeDependedAliases ( $ alias , $ id ) { foreach ( $ this -> ids [ $ id ] as $ otherAlias ) { if ( isset ( $ this -> aliases [ $ otherAlias ] ) && $ this -> aliases [ $ otherAlias ] === $ alias ) { unset ( $ this -> aliases [ $ otherAlias ] ) ; $ aliases = & $ this -> ids [ $ id ] ; unset ( $ aliases [ array_search ( $ otherAlias , $ aliases , true ) ] ) ; if ( ! empty ( $ aliases ) ) { $ this -> removeDependedAliases ( $ otherAlias , $ id ) ; } else { unset ( $ this -> ids [ $ id ] ) ; } } } }
docstring: Removes all depended aliases
  For example if "alias3" is removed in alias chain like "alias1 -> alias2 -> alias3 -> id"
  than both "alias1" and "alias2" are removed as well
  
  @param string $alias
  @param string $id
docstring_tokens: Removes all depended aliases For example if alias3 is removed in alias chain like alias1 - > alias2 - > alias3 - > id than both alias1 and alias2 are removed as well