original_string: protected function fixDefaultRelations(array & $relations)
      {
          foreach ($relations as $key => $relation) {
              if ('role_adldap_by_role_id' === $relation && !class_exists(LDAP::class)) {
                  unset($relations[$key]);
              }
          }
      }
code: protected function fixDefaultRelations(array & $relations)
      {
          foreach ($relations as $key => $relation) {
              if ('role_adldap_by_role_id' === $relation && !class_exists(LDAP::class)) {
                  unset($relations[$key]);
              }
          }
      }
code_tokens: protected function fixDefaultRelations ( array & $ relations ) { foreach ( $ relations as $ key => $ relation ) { if ( 'role_adldap_by_role_id' === $ relation && ! class_exists ( LDAP :: class ) ) { unset ( $ relations [ $ key ] ) ; } } }
docstring: Removes any relation where related service is not installed.
  
  @param array $relations
docstring_tokens: Removes any relation where related service is not installed .