original_string: public function focus()
      {
          if (\in_array($this->attribs['type'], array('checkbox', 'radio'))) {
              $keys = \array_keys($this->props['options']);
              $this->props['options'][ $keys[0] ]['autofocus'] = true;
          } else {
              $this->attribs['autofocus'] = true;
          }
      }
code: public function focus()
      {
          if (\in_array($this->attribs['type'], array('checkbox', 'radio'))) {
              $keys = \array_keys($this->props['options']);
              $this->props['options'][ $keys[0] ]['autofocus'] = true;
          } else {
              $this->attribs['autofocus'] = true;
          }
      }
code_tokens: public function focus ( ) { if ( \ in_array ( $ this -> attribs [ 'type' ] , array ( 'checkbox' , 'radio' ) ) ) { $ keys = \ array_keys ( $ this -> props [ 'options' ] ) ; $ this -> props [ 'options' ] [ $ keys [ 0 ] ] [ 'autofocus' ] = true ; } else { $ this -> attribs [ 'autofocus' ] = true ; } }
docstring: Sets autofocus attribute
  
  @return void
docstring_tokens: Sets autofocus attribute