original_string: protected function getAllowedTypes(array $options)
      {
          $types = null;
  
          if (isset($options['file_types'])) {
  
              $types = $options['file_types'];
              $self  = $this;
  
              if (!is_array($types)) {
                  $types = explode(',', $types);
                  $types = array_map('trim', $types);
              }
  
              array_walk(
                  $types,
                  function (&$val) use ($self) {
                      if (false == preg_match('#^([^/]+)/([\w|\.|\-]+)#', $val)) {
                          $val = $self->getMimeType($val);
                      }
                  }
              );
          }
  
          return $types;
      }
code: protected function getAllowedTypes(array $options)
      {
          $types = null;
  
          if (isset($options['file_types'])) {
  
              $types = $options['file_types'];
              $self  = $this;
  
              if (!is_array($types)) {
                  $types = explode(',', $types);
                  $types = array_map('trim', $types);
              }
  
              array_walk(
                  $types,
                  function (&$val) use ($self) {
                      if (false == preg_match('#^([^/]+)/([\w|\.|\-]+)#', $val)) {
                          $val = $self->getMimeType($val);
                      }
                  }
              );
          }
  
          return $types;
      }
code_tokens: protected function getAllowedTypes ( array $ options ) { $ types = null ; if ( isset ( $ options [ 'file_types' ] ) ) { $ types = $ options [ 'file_types' ] ; $ self = $ this ; if ( ! is_array ( $ types ) ) { $ types = explode ( ',' , $ types ) ; $ types = array_map ( 'trim' , $ types ) ; } array_walk ( $ types , function ( & $ val ) use ( $ self ) { if ( false == preg_match ( '#^([^/]+)/([\w|\.|\-]+)#' , $ val ) ) { $ val = $ self -> getMimeType ( $ val ) ; } } ) ; } return $ types ; }
docstring: Update options field file_types
  so if only extension is given it
  will try to determine mime type
  
  @param array $options
  @return null | mixed;
docstring_tokens: Update options field file_types so if only extension is given it will try to determine mime type