original_string: public function createUsername($username)
      {
          if (!$this->hasEnabledUsername()) {
              return null;
          }
          $usernameClass = $this->usernameClass;
          $model = $usernameClass::findOne($this->getGUID());
          if (!$model) {
              $model = $this->create($usernameClass);
              $model->setGUID($this->getGUID());
          }
          $model->content = $username;
          return $model;
      }
code: public function createUsername($username)
      {
          if (!$this->hasEnabledUsername()) {
              return null;
          }
          $usernameClass = $this->usernameClass;
          $model = $usernameClass::findOne($this->getGUID());
          if (!$model) {
              $model = $this->create($usernameClass);
              $model->setGUID($this->getGUID());
          }
          $model->content = $username;
          return $model;
      }
code_tokens: public function createUsername ( $ username ) { if ( ! $ this -> hasEnabledUsername ( ) ) { return null ; } $ usernameClass = $ this -> usernameClass ; $ model = $ usernameClass :: findOne ( $ this -> getGUID ( ) ) ; if ( ! $ model ) { $ model = $ this -> create ( $ usernameClass ) ; $ model -> setGUID ( $ this -> getGUID ( ) ) ; } $ model -> content = $ username ; return $ model ; }
docstring: Create or get username.
  @param $username
  @return null|Username
docstring_tokens: Create or get username .