Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/PgAsync/Command/Sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace PgAsync\Command;

use pq\Exception\InvalidArgumentException;
use Rx\ObserverInterface;

class Sync implements CommandInterface
Expand All @@ -10,8 +11,11 @@ class Sync implements CommandInterface

private $description;

public function __construct(string $description = "", ObserverInterface $observer)
public function __construct(string $description = "", ?ObserverInterface $observer = null)
{
if (null === $observer) {
throw new InvalidArgumentException('Observer interface is required.');
}
$this->description = $description;
$this->observer = $observer;
}
Expand Down