original_string: public function checkDependentModules($module_id, array $modules)
      {
          unset($modules[$module_id]);
  
          $required_by = array();
  
          foreach ($modules as $info) {
  
              if (empty($info['dependencies'])) {
                  continue;
              }
  
              foreach (array_keys($info['dependencies']) as $dependency) {
                  if ($dependency === $module_id && !empty($info['status'])) {
                      $required_by[] = $info['name'];
                  }
              }
          }
  
          if (empty($required_by)) {
              return true;
          }
  
          throw new UnexpectedValueException($this->translation->text('Required by') . ': ' . implode(', ', $required_by));
      }
code: public function checkDependentModules($module_id, array $modules)
      {
          unset($modules[$module_id]);
  
          $required_by = array();
  
          foreach ($modules as $info) {
  
              if (empty($info['dependencies'])) {
                  continue;
              }
  
              foreach (array_keys($info['dependencies']) as $dependency) {
                  if ($dependency === $module_id && !empty($info['status'])) {
                      $required_by[] = $info['name'];
                  }
              }
          }
  
          if (empty($required_by)) {
              return true;
          }
  
          throw new UnexpectedValueException($this->translation->text('Required by') . ': ' . implode(', ', $required_by));
      }
code_tokens: public function checkDependentModules ( $ module_id , array $ modules ) { unset ( $ modules [ $ module_id ] ) ; $ required_by = array ( ) ; foreach ( $ modules as $ info ) { if ( empty ( $ info [ 'dependencies' ] ) ) { continue ; } foreach ( array_keys ( $ info [ 'dependencies' ] ) as $ dependency ) { if ( $ dependency === $ module_id && ! empty ( $ info [ 'status' ] ) ) { $ required_by [ ] = $ info [ 'name' ] ; } } } if ( empty ( $ required_by ) ) { return true ; } throw new UnexpectedValueException ( $ this -> translation -> text ( 'Required by' ) . ': ' . implode ( ', ' , $ required_by ) ) ; }
docstring: Checks dependent modules
  @param string $module_id
  @param array $modules
  @return bool
  @throws UnexpectedValueException
docstring_tokens: Checks dependent modules