original_string: public function getWrapper($wrapper, $attr)
      {
          $type = '';
          if (! empty($attr['type'])) {
              $type = ' ' . $attr['type'];
  
              if ((isset($attr['type']) && $attr['type'] == 'select') && in_array('multiple', $attr)) {
                  $type .= ' multiselect';
              }
          }
  
          $defaults = array(
              'tag' => 'div',
              'class' => 'input' . $type
          );
  
          $wrapperAttr = array_merge(
              $defaults,
              $wrapper
          );
  
          // double check for the presence of a tag element
          $tag = $wrapperAttr['tag'];
          unset($wrapperAttr['tag']);
  
          return array(
              'tag' => $tag,
              'attr' => $wrapperAttr
          );
      }
code: public function getWrapper($wrapper, $attr)
      {
          $type = '';
          if (! empty($attr['type'])) {
              $type = ' ' . $attr['type'];
  
              if ((isset($attr['type']) && $attr['type'] == 'select') && in_array('multiple', $attr)) {
                  $type .= ' multiselect';
              }
          }
  
          $defaults = array(
              'tag' => 'div',
              'class' => 'input' . $type
          );
  
          $wrapperAttr = array_merge(
              $defaults,
              $wrapper
          );
  
          // double check for the presence of a tag element
          $tag = $wrapperAttr['tag'];
          unset($wrapperAttr['tag']);
  
          return array(
              'tag' => $tag,
              'attr' => $wrapperAttr
          );
      }
code_tokens: public function getWrapper ( $ wrapper , $ attr ) { $ type = '' ; if ( ! empty ( $ attr [ 'type' ] ) ) { $ type = ' ' . $ attr [ 'type' ] ; if ( ( isset ( $ attr [ 'type' ] ) && $ attr [ 'type' ] == 'select' ) && in_array ( 'multiple' , $ attr ) ) { $ type .= ' multiselect' ; } } $ defaults = array ( 'tag' => 'div' , 'class' => 'input' . $ type ) ; $ wrapperAttr = array_merge ( $ defaults , $ wrapper ) ; // double check for the presence of a tag element $ tag = $ wrapperAttr [ 'tag' ] ; unset ( $ wrapperAttr [ 'tag' ] ) ; return array ( 'tag' => $ tag , 'attr' => $ wrapperAttr ) ; }
docstring: given any user defined wrapper instructions
  build the wrapper data
  
  @param   array   Array of any passed wrapper info
  @param   array   Array of the inputs attributes
  @return  array   two element array of tag / attr
docstring_tokens: given any user defined wrapper instructions build the wrapper data