Skip to content

Commit b776772

Browse files
committed
IHF: Static constructor used.
1 parent 6f479ec commit b776772

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/artisan.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
if (!function_exists('call_in_background')) {
66
function call_in_background($command, $before = null, $after = null)
77
{
8-
return (new Command($command, $before, $after))->runInBackground();
8+
return Command::factory($command, $before, $after)->runInBackground();
99
}
1010
}

src/classes/Artisan/Command.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ public function __construct($command, $before = null, $after = null)
1818
$this->after = $after;
1919
}
2020

21+
public static function factory($command, $before = null, $after = null)
22+
{
23+
return new self($command, $before, $after);
24+
}
25+
2126
public function runInBackground()
2227
{
2328
exec($this->composeForRunInBackground());

0 commit comments

Comments
 (0)