diff --git a/lib/MongoSql/Collection.php b/lib/MongoSql/Collection.php index 7a02609..ddd91bf 100644 --- a/lib/MongoSql/Collection.php +++ b/lib/MongoSql/Collection.php @@ -128,7 +128,7 @@ public function __toString(): string * in favor of * `$collection->find([], ['limit' => 1])` */ - public function find($filter = [], array $options = []): CursorInterface + public function find($filter, array $options = []): CursorInterface { return new Cursor($this->connection, $this->queryBuilder, $this->collectionName, $filter, $options); } @@ -140,7 +140,7 @@ public function find($filter = [], array $options = []): CursorInterface * @param array [$options] * @return array|null */ - public function findOne($filter = [], array $options = []): ?array + public function findOne($filter, array $options = []): ?array { $results = $this->find($filter, array_merge($options, [ 'limit' => 1 @@ -207,7 +207,7 @@ public function insertOne(&$document): bool * @param array [$options] * @return bool */ - public function updateMany($filter = [], array $update, array $options = []): bool + public function updateMany($filter, array $update, array $options = []): bool { $stmt = $this->connection->prepare( <<updateMany($filter, $update, [ 'limit' => 1 @@ -275,7 +275,7 @@ public function replaceOne(array $filter, array $replace): bool SQL ); - $stmt->execute([':data' => QueryBuilder::jsonEncode($replace)]); + $stmt->execute([':data' => QueryBuilder::jsonEncode($replace)]); return true; }