original_string: public function setUsername($username = null)
      {
          if ($username === null && ($model = $this->getUsername()->one())) {
              return $model->delete() > 0;
          }
          if ($username instanceof Username) {
              $username = $username->content;
          }
          $model = $this->createUsername($username);
          return $model->save();
      }
code: public function setUsername($username = null)
      {
          if ($username === null && ($model = $this->getUsername()->one())) {
              return $model->delete() > 0;
          }
          if ($username instanceof Username) {
              $username = $username->content;
          }
          $model = $this->createUsername($username);
          return $model->save();
      }
code_tokens: public function setUsername ( $ username = null ) { if ( $ username === null && ( $ model = $ this -> getUsername ( ) -> one ( ) ) ) { return $ model -> delete ( ) > 0 ; } if ( $ username instanceof Username ) { $ username = $ username -> content ; } $ model = $ this -> createUsername ( $ username ) ; return $ model -> save ( ) ; }
docstring: Set username.
  @param string|Username $username
  @return bool
docstring_tokens: Set username .