original_string: protected function buildIdentificationCriteria(array $subject)
      {
          $criteria = [];
  
          foreach ($this->identificationFields as $dbField => $subjectField) {
              if (empty($subject[$subjectField])) {
                  throw new \InvalidArgumentException(sprintf('Subject must contain a(n) "%s" field', $subjectField));
              }
  
              if (is_numeric($dbField)) {
                  $dbField = $subjectField;
              }
  
              $criteria[$dbField] = $subject[$subjectField];
          }
  
          return $criteria;
      }
code: protected function buildIdentificationCriteria(array $subject)
      {
          $criteria = [];
  
          foreach ($this->identificationFields as $dbField => $subjectField) {
              if (empty($subject[$subjectField])) {
                  throw new \InvalidArgumentException(sprintf('Subject must contain a(n) "%s" field', $subjectField));
              }
  
              if (is_numeric($dbField)) {
                  $dbField = $subjectField;
              }
  
              $criteria[$dbField] = $subject[$subjectField];
          }
  
          return $criteria;
      }
code_tokens: protected function buildIdentificationCriteria ( array $ subject ) { $ criteria = [ ] ; foreach ( $ this -> identificationFields as $ dbField => $ subjectField ) { if ( empty ( $ subject [ $ subjectField ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Subject must contain a(n) "%s" field' , $ subjectField ) ) ; } if ( is_numeric ( $ dbField ) ) { $ dbField = $ subjectField ; } $ criteria [ $ dbField ] = $ subject [ $ subjectField ] ; } return $ criteria ; }
docstring: Checks if all identification field is included in the subject and builds a criteria
  
  @param array $subject
  
  @return array
  
  @throws \InvalidArgumentException If one of the fields is missing
docstring_tokens: Checks if all identification field is included in the subject and builds a criteria