original_string: public function toArray()
      {
          $args = func_get_args();
          if ($args) {
              $attributes = [];
              foreach ($args as $key) {
                  if ($this->hasAttribute($key)) {
                      $attributes[$key] = $this->get($key);
                  }
              }
              return $attributes;
          } else {
              return $this->attributes;
          }
      }
code: public function toArray()
      {
          $args = func_get_args();
          if ($args) {
              $attributes = [];
              foreach ($args as $key) {
                  if ($this->hasAttribute($key)) {
                      $attributes[$key] = $this->get($key);
                  }
              }
              return $attributes;
          } else {
              return $this->attributes;
          }
      }
code_tokens: public function toArray ( ) { $ args = func_get_args ( ) ; if ( $ args ) { $ attributes = [ ] ; foreach ( $ args as $ key ) { if ( $ this -> hasAttribute ( $ key ) ) { $ attributes [ $ key ] = $ this -> get ( $ key ) ; } } return $ attributes ; } else { return $ this -> attributes ; } }
docstring: convert to Array
  
  @return  array
docstring_tokens: convert to Array