name: ServeCommand
class_comment: null
dependencies:
- name: Command
  type: class
  source: Illuminate\Console\Command
- name: Carbon
  type: class
  source: Illuminate\Support\Carbon
- name: Env
  type: class
  source: Illuminate\Support\Env
- name: InteractsWithTime
  type: class
  source: Illuminate\Support\InteractsWithTime
- name: AsCommand
  type: class
  source: Symfony\Component\Console\Attribute\AsCommand
- name: InputOption
  type: class
  source: Symfony\Component\Console\Input\InputOption
- name: PhpExecutableFinder
  type: class
  source: Symfony\Component\Process\PhpExecutableFinder
- name: Process
  type: class
  source: Symfony\Component\Process\Process
- name: InteractsWithTime
  type: class
  source: InteractsWithTime
properties:
- name: name
  visibility: protected
  comment: '# * The console command name.

    # *

    # * @var string'
- name: description
  visibility: protected
  comment: '# * The console command description.

    # *

    # * @var string'
- name: portOffset
  visibility: protected
  comment: '# * The current port offset.

    # *

    # * @var int'
- name: outputBuffer
  visibility: protected
  comment: '# * The list of lines that are pending to be output.

    # *

    # * @var string'
- name: requestsPool
  visibility: protected
  comment: '# * The list of requests being handled and their start time.

    # *

    # * @var array<int, \Illuminate\Support\Carbon>'
- name: serverRunningHasBeenDisplayed
  visibility: protected
  comment: '# * Indicates if the "Server running on..." output message has been displayed.

    # *

    # * @var bool'
- name: passthroughVariables
  visibility: public
  comment: '# * The environment variables that should be passed from host machine
    to the PHP server process.

    # *

    # * @var string[]'
methods:
- name: handle
  visibility: public
  parameters: []
  comment: "# * The console command name.\n# *\n# * @var string\n# */\n# protected\
    \ $name = 'serve';\n# \n# /**\n# * The console command description.\n# *\n# *\
    \ @var string\n# */\n# protected $description = 'Serve the application on the\
    \ PHP development server';\n# \n# /**\n# * The current port offset.\n# *\n# *\
    \ @var int\n# */\n# protected $portOffset = 0;\n# \n# /**\n# * The list of lines\
    \ that are pending to be output.\n# *\n# * @var string\n# */\n# protected $outputBuffer\
    \ = '';\n# \n# /**\n# * The list of requests being handled and their start time.\n\
    # *\n# * @var array<int, \\Illuminate\\Support\\Carbon>\n# */\n# protected $requestsPool;\n\
    # \n# /**\n# * Indicates if the \"Server running on...\" output message has been\
    \ displayed.\n# *\n# * @var bool\n# */\n# protected $serverRunningHasBeenDisplayed\
    \ = false;\n# \n# /**\n# * The environment variables that should be passed from\
    \ host machine to the PHP server process.\n# *\n# * @var string[]\n# */\n# public\
    \ static $passthroughVariables = [\n# 'APP_ENV',\n# 'HERD_PHP_81_INI_SCAN_DIR',\n\
    # 'HERD_PHP_82_INI_SCAN_DIR',\n# 'HERD_PHP_83_INI_SCAN_DIR',\n# 'IGNITION_LOCAL_SITES_PATH',\n\
    # 'LARAVEL_SAIL',\n# 'PATH',\n# 'PHP_CLI_SERVER_WORKERS',\n# 'PHP_IDE_CONFIG',\n\
    # 'SYSTEMROOT',\n# 'XDEBUG_CONFIG',\n# 'XDEBUG_MODE',\n# 'XDEBUG_SESSION',\n#\
    \ ];\n# \n# /**\n# * Execute the console command.\n# *\n# * @return int\n# *\n\
    # * @throws \\Exception"
- name: startProcess
  visibility: protected
  parameters:
  - name: hasEnvironment
  comment: '# * Start a new server process.

    # *

    # * @param  bool  $hasEnvironment

    # * @return \Symfony\Component\Process\Process'
- name: serverCommand
  visibility: protected
  parameters: []
  comment: '# * Get the full server command.

    # *

    # * @return array'
- name: host
  visibility: protected
  parameters: []
  comment: '# * Get the host for the command.

    # *

    # * @return string'
- name: port
  visibility: protected
  parameters: []
  comment: '# * Get the port for the command.

    # *

    # * @return string'
- name: getHostAndPort
  visibility: protected
  parameters: []
  comment: '# * Get the host and port from the host option string.

    # *

    # * @return array'
- name: canTryAnotherPort
  visibility: protected
  parameters: []
  comment: '# * Check if the command has reached its maximum number of port tries.

    # *

    # * @return bool'
- name: handleProcessOutput
  visibility: protected
  parameters: []
  comment: '# * Returns a "callable" to handle the process output.

    # *

    # * @return callable(string, string): void'
- name: flushOutputBuffer
  visibility: protected
  parameters: []
  comment: '# * Flush the output buffer.

    # *

    # * @return void'
- name: getDateFromLine
  visibility: protected
  parameters:
  - name: line
  comment: '# * Get the date from the given PHP server output.

    # *

    # * @param  string  $line

    # * @return \Illuminate\Support\Carbon'
- name: getRequestPortFromLine
  visibility: protected
  parameters:
  - name: line
  comment: '# * Get the request port from the given PHP server output.

    # *

    # * @param  string  $line

    # * @return int'
- name: getOptions
  visibility: protected
  parameters: []
  comment: '# * Get the console command options.

    # *

    # * @return array'
traits:
- Illuminate\Console\Command
- Illuminate\Support\Carbon
- Illuminate\Support\Env
- Illuminate\Support\InteractsWithTime
- Symfony\Component\Console\Attribute\AsCommand
- Symfony\Component\Console\Input\InputOption
- Symfony\Component\Process\PhpExecutableFinder
- Symfony\Component\Process\Process
- InteractsWithTime
interfaces: []