Skip to content

Commit ec23e01

Browse files
committed
Few fixes
1 parent a105380 commit ec23e01

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

src/Write/Model/ReplaceOne.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct($filter, $replacement, array $options = [])
3939
throw new InvalidArgumentException(
4040
sprintf(
4141
'$replacement must be an array or an object, %s given',
42-
TypeUtil::getType($filter)
42+
TypeUtil::getType($replacement)
4343
)
4444
);
4545
}

src/Write/Model/Traits/EnsureValidUpdateTrait.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ public static function ensureValidUpdate($update)
2828
throw new InvalidArgumentException('$update cannot be empty');
2929
}
3030

31-
32-
3331
try {
3432
self::getUpdateResolver()->resolve($update);
3533
} catch(OptionsResolverException $e) {

src/Write/Model/UpdateMany.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct($filter, $update, array $options = [])
2424
$options += ['multi' => true];
2525

2626
$options = UpdateOptions::resolve($options);
27-
if (isset($options['multi']) && !$options['multi']) {
27+
if (isset($options['multi']) && false === $options['multi']) {
2828
throw new InvalidArgumentException(
2929
'UpdateMany operation does not allow option "multi" to be false'
3030
);

0 commit comments

Comments
 (0)