Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVanderbist authored and github-actions[bot] committed Aug 25, 2023
1 parent db385ff commit 59985e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/Pool.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static function isSupported(): bool
function_exists('pcntl_async_signals')
&& function_exists('posix_kill')
&& function_exists('proc_open')
&& !self::$forceSynchronous;
&& ! self::$forceSynchronous;
}

public function forceSynchronous(): self
Expand Down Expand Up @@ -126,7 +126,7 @@ public function notify()

$process = array_shift($this->queue);

if (!$process) {
if (! $process) {
return;
}

Expand All @@ -141,11 +141,11 @@ public function notify()
*/
public function add($process, ?int $outputLength = null): Runnable
{
if (!is_callable($process) && !$process instanceof Runnable) {
if (! is_callable($process) && ! $process instanceof Runnable) {
throw new InvalidArgumentException('The process passed to Pool::add should be callable.');
}

if (!$process instanceof Runnable) {
if (! $process instanceof Runnable) {
$process = ParentRuntime::createProcess(
$process,
$outputLength,
Expand Down Expand Up @@ -176,7 +176,7 @@ public function wait(?callable $intermediateCallback = null): array
}
}

if (!$this->inProgress) {
if (! $this->inProgress) {
break;
}

Expand Down Expand Up @@ -350,7 +350,7 @@ protected function handleFinishedProcess(int $pid, int $status)
{
$process = $this->inProgress[$pid] ?? null;

if (!$process) {
if (! $process) {
return;
}

Expand Down
6 changes: 3 additions & 3 deletions src/Runtime/ParentRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ParentRuntime

public static function init(string $autoloader = null)
{
if (!$autoloader) {
if (! $autoloader) {
$existingAutoloaderFiles = array_filter([
__DIR__ . '/../../../../autoload.php',
__DIR__ . '/../../../autoload.php',
Expand All @@ -55,11 +55,11 @@ public static function init(string $autoloader = null)
*/
public static function createProcess($task, ?int $outputLength = null, ?string $binary = 'php', ?int $max_input_size = 100000): Runnable
{
if (!self::$isInitialised) {
if (! self::$isInitialised) {
self::init();
}

if (!Pool::isSupported()) {
if (! Pool::isSupported()) {
return SynchronousProcess::create($task, self::getId());
}

Expand Down

0 comments on commit 59985e7

Please sign in to comment.