REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 5.12 KB
Close
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Process/FakeProcessDescription.php
Text
Base64
<?php namespace Illuminate\Process; use Illuminate\Support\Collection; use Symfony\Component\Process\Process; class FakeProcessDescription { /** * The process' ID. * * @var int|null */ public $processId = 1000; /** * All of the process' output in the order it was described. * * @var array */ public $output = []; /** * The process' exit code. * * @var int */ public $exitCode = 0; /** * The number of times the process should indicate that it is "running". * * @var int */ public $runIterations = 0; /** * Specify the process ID that should be assigned to the process. * * @param int $processId * @return $this */ public function id(int $processId) { $this->processId = $processId; return $this; } /** * Describe a line of standard output. * * @param array|string $output * @return $this */ public function output(array|string $output) { if (is_array($output)) { (new Collection($output))->each(fn ($line) => $this->output($line)); return $this; } $this->output[] = ['type' => 'out', 'buffer' => rtrim($output, "\n")."\n"]; return $this; } /** * Describe a line of error output. * * @param array|string $output * @return $this */ public function errorOutput(array|string $output) { if (is_array($output)) { (new Collection($output))->each(fn ($line) => $this->errorOutput($line)); return $this; } $this->output[] = ['type' => 'err', 'buffer' => rtrim($output, "\n")."\n"]; return $this; } /** * Replace the entire output buffer with the given string. * * @param string $output * @return $this */ public function replaceOutput(string $output) { $this->output = (new Collection($this->output))->reject(function ($output) { return $output['type'] === 'out'; })->values()->all(); if (strlen($output) > 0) { $this->output[] = [ 'type' => 'out', 'buffer' => rtrim($output, "\n")."\n", ]; } return $this; } /** * Replace the entire error output buffer with the given string. * * @param string $output * @return $this */ public function replaceErrorOutput(string $output) { $this->output = (new Collection($this->output))->reject(function ($output) { return $output['type'] === 'err'; })->values()->all(); if (strlen($output) > 0) { $this->output[] = [ 'type' => 'err', 'buffer' => rtrim($output, "\n")."\n", ]; } return $this; } /** * Specify the process exit code. * * @param int $exitCode * @return $this */ public function exitCode(int $exitCode) { $this->exitCode = $exitCode; return $this; } /** * Specify how many times the "isRunning" method should return "true". * * @param int $iterations * @return $this */ public function iterations(int $iterations) { return $this->runsFor(iterations: $iterations); } /** * Specify how many times the "isRunning" method should return "true". * * @param int $iterations * @return $this */ public function runsFor(int $iterations) { $this->runIterations = $iterations; return $this; } /** * Turn the fake process description into an actual process. * * @param string $command * @return \Symfony\Component\Process\Process */ public function toSymfonyProcess(string $command) { return Process::fromShellCommandline($command); } /** * Convert the process description into a process result. * * @param string $command * @return \Illuminate\Contracts\Process\ProcessResult */ public function toProcessResult(string $command) { return new FakeProcessResult( command: $command, exitCode: $this->exitCode, output: $this->resolveOutput(), errorOutput: $this->resolveErrorOutput(), ); } /** * Resolve the standard output as a string. * * @return string */ protected function resolveOutput() { $output = (new Collection($this->output)) ->filter(fn ($output) => $output['type'] === 'out'); return $output->isNotEmpty() ? rtrim($output->map->buffer->implode(''), "\n")."\n" : ''; } /** * Resolve the error output as a string. * * @return string */ protected function resolveErrorOutput() { $output = (new Collection($this->output)) ->filter(fn ($output) => $output['type'] === 'err'); return $output->isNotEmpty() ? rtrim($output->map->buffer->implode(''), "\n")."\n" : ''; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 14
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Exceptions
DIR
-
drwxrwxrwx
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
composer.json
942 B
lrw-rw-rw-
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Factory.php
8.44 KB
lrw-rw-rw-
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FakeInvokedProcess.php
7.17 KB
lrw-rw-rw-
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FakeProcessDescription.php
5.12 KB
lrw-rw-rw-
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FakeProcessResult.php
4.48 KB
lrw-rw-rw-
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FakeProcessSequence.php
3.40 KB
lrw-rw-rw-
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
InvokedProcess.php
3.44 KB
lrw-rw-rw-
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
InvokedProcessPool.php
1.80 KB
lrw-rw-rw-
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LICENSE.md
1.05 KB
lrw-rw-rw-
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PendingProcess.php
11.36 KB
lrw-rw-rw-
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Pipe.php
2.76 KB
lrw-rw-rw-
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Pool.php
3.00 KB
lrw-rw-rw-
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ProcessPoolResults.php
1.94 KB
lrw-rw-rw-
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ProcessResult.php
3.09 KB
lrw-rw-rw-
2025-09-17 06:53:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).