Skip to content

Commit

Permalink
Fix options checks (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
zloyuser authored Dec 13, 2022
1 parent f6e94ac commit b60a7d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FormatFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static function create(string $class, array $config = []): Format
throw new InvalidArgumentException('Materialize AVRO format "connection" config required');
}

if (isset($config['options']) || !is_array($config['options'])) {
if (isset($config['options']) && !is_array($config['options'])) {
throw new InvalidArgumentException('Materialize AVRO format "options" config must be array');
}

Expand All @@ -49,7 +49,7 @@ public static function create(string $class, array $config = []): Format
throw new InvalidArgumentException('Materialize Protobuf format "connection" config required');
}

if (isset($config['options']) || !is_array($config['options'])) {
if (isset($config['options']) && !is_array($config['options'])) {
throw new InvalidArgumentException('Materialize Protobuf format "options" config must be array');
}

Expand Down

0 comments on commit b60a7d4

Please sign in to comment.