original_string: protected function checkRequired($exportCode, array $roundsData)
      {
          // First find rounds using this export code
          $rounds = array();
          foreach ($roundsData as $roundData) {
              if ($roundData['survey_export_code'] == $exportCode) {
                  $rounds[$roundData['gro_id_order']] = $roundData['gro_id_order'];
              }
          }
  
          if (! $rounds) {
              return false;
          }
  
          // The check for any round using such a round
          foreach ($roundsData as $roundData) {
              if (isset($roundData['gro_valid_after_source'], $roundData['valid_after'])) {
                  if ($this->checkSourceRequired(
                          $roundData['gro_valid_after_source'],
                          $roundData['valid_after'],
                          $rounds
                          )) {
                      return true;
                  }
              }
              if (isset($roundData['gro_valid_after_source'], $roundData['valid_for'])) {
                  if ($this->checkSourceRequired(
                          $roundData['gro_valid_for_source'],
                          $roundData['valid_for'],
                          $rounds
                          )) {
                      return true;
                  }
              }
          }
          return false;
      }
code: protected function checkRequired($exportCode, array $roundsData)
      {
          // First find rounds using this export code
          $rounds = array();
          foreach ($roundsData as $roundData) {
              if ($roundData['survey_export_code'] == $exportCode) {
                  $rounds[$roundData['gro_id_order']] = $roundData['gro_id_order'];
              }
          }
  
          if (! $rounds) {
              return false;
          }
  
          // The check for any round using such a round
          foreach ($roundsData as $roundData) {
              if (isset($roundData['gro_valid_after_source'], $roundData['valid_after'])) {
                  if ($this->checkSourceRequired(
                          $roundData['gro_valid_after_source'],
                          $roundData['valid_after'],
                          $rounds
                          )) {
                      return true;
                  }
              }
              if (isset($roundData['gro_valid_after_source'], $roundData['valid_for'])) {
                  if ($this->checkSourceRequired(
                          $roundData['gro_valid_for_source'],
                          $roundData['valid_for'],
                          $rounds
                          )) {
                      return true;
                  }
              }
          }
          return false;
      }
code_tokens: protected function checkRequired ( $ exportCode , array $ roundsData ) { // First find rounds using this export code $ rounds = array ( ) ; foreach ( $ roundsData as $ roundData ) { if ( $ roundData [ 'survey_export_code' ] == $ exportCode ) { $ rounds [ $ roundData [ 'gro_id_order' ] ] = $ roundData [ 'gro_id_order' ] ; } } if ( ! $ rounds ) { return false ; } // The check for any round using such a round foreach ( $ roundsData as $ roundData ) { if ( isset ( $ roundData [ 'gro_valid_after_source' ] , $ roundData [ 'valid_after' ] ) ) { if ( $ this -> checkSourceRequired ( $ roundData [ 'gro_valid_after_source' ] , $ roundData [ 'valid_after' ] , $ rounds ) ) { return true ; } } if ( isset ( $ roundData [ 'gro_valid_after_source' ] , $ roundData [ 'valid_for' ] ) ) { if ( $ this -> checkSourceRequired ( $ roundData [ 'gro_valid_for_source' ] , $ roundData [ 'valid_for' ] , $ rounds ) ) { return true ; } } } return false ; }
docstring: Returns tru if another round depends on a round using this export code
  
  @param string $exportCode
  @param array $roundsData
  @return boolean
docstring_tokens: Returns tru if another round depends on a round using this export code