original_string: public function hostname(Hostname $hostname = null): ?Hostname
      {
          if ($hostname !== null) {
              $this->app->instance(CurrentHostname::class, $hostname);
  
              $this->emitEvent(new Events\Hostnames\Switched($hostname));
  
              return $hostname;
          }
  
          return $this->app->make(CurrentHostname::class);
      }
code: public function hostname(Hostname $hostname = null): ?Hostname
      {
          if ($hostname !== null) {
              $this->app->instance(CurrentHostname::class, $hostname);
  
              $this->emitEvent(new Events\Hostnames\Switched($hostname));
  
              return $hostname;
          }
  
          return $this->app->make(CurrentHostname::class);
      }
code_tokens: public function hostname ( Hostname $ hostname = null ) : ? Hostname { if ( $ hostname !== null ) { $ this -> app -> instance ( CurrentHostname :: class , $ hostname ) ; $ this -> emitEvent ( new Events \ Hostnames \ Switched ( $ hostname ) ) ; return $ hostname ; } return $ this -> app -> make ( CurrentHostname :: class ) ; }
docstring: Get or set the current hostname.
  
  @param Hostname|null $hostname
  @return Hostname|null
docstring_tokens: Get or set the current hostname .