original_string: protected function bindParameter(\PDOStatement $stmt, $params, $types)
      {
          !is_array($params) && $params = array($params);
          !is_array($types) && $types = array($types);
  
          $isIndex = is_int(key($params));
          $index = 1;
  
          foreach ($params as $name => $param) {
              // Number index parameters
              if ($isIndex) {
                  if (isset($types[$index - 1])) {
                      $stmt->bindValue($index, $param, $types[$index - 1]);
                  } else {
                      $stmt->bindValue($index, $param);
                  }
                  $index++;
              // Named parameters
              } else {
                  if (isset($types[$name])) {
                      $stmt->bindValue($name, $param, $types[$name]);
                  } else {
                      $stmt->bindValue($name, $param);
                  }
              }
          }
      }
code: protected function bindParameter(\PDOStatement $stmt, $params, $types)
      {
          !is_array($params) && $params = array($params);
          !is_array($types) && $types = array($types);
  
          $isIndex = is_int(key($params));
          $index = 1;
  
          foreach ($params as $name => $param) {
              // Number index parameters
              if ($isIndex) {
                  if (isset($types[$index - 1])) {
                      $stmt->bindValue($index, $param, $types[$index - 1]);
                  } else {
                      $stmt->bindValue($index, $param);
                  }
                  $index++;
              // Named parameters
              } else {
                  if (isset($types[$name])) {
                      $stmt->bindValue($name, $param, $types[$name]);
                  } else {
                      $stmt->bindValue($name, $param);
                  }
              }
          }
      }
code_tokens: protected function bindParameter ( \ PDOStatement $ stmt , $ params , $ types ) { ! is_array ( $ params ) && $ params = array ( $ params ) ; ! is_array ( $ types ) && $ types = array ( $ types ) ; $ isIndex = is_int ( key ( $ params ) ) ; $ index = 1 ; foreach ( $ params as $ name => $ param ) { // Number index parameters if ( $ isIndex ) { if ( isset ( $ types [ $ index - 1 ] ) ) { $ stmt -> bindValue ( $ index , $ param , $ types [ $ index - 1 ] ) ; } else { $ stmt -> bindValue ( $ index , $ param ) ; } $ index ++ ; // Named parameters } else { if ( isset ( $ types [ $ name ] ) ) { $ stmt -> bindValue ( $ name , $ param , $ types [ $ name ] ) ; } else { $ stmt -> bindValue ( $ name , $ param ) ; } } } }
docstring: Bind parameters to statement object
  
  @param \PDOStatement $stmt
  @param array $params
  @param array $types
docstring_tokens: Bind parameters to statement object