diff --git a/lib/MongoSql/Collection.php b/lib/MongoSql/Collection.php index ddd91bf..434c1a4 100644 --- a/lib/MongoSql/Collection.php +++ b/lib/MongoSql/Collection.php @@ -51,7 +51,7 @@ class Collection implements CollectionInterface /** @var \MongoSql\QueryBuilder\QueryBuilder */ protected $queryBuilder; - /** @var string Collection name */ + /** @var string - Collection name */ protected $collectionName; /** @var callable|null */ @@ -81,7 +81,7 @@ public function __construct( /** * Create factory callable which takes on only $collectionName parameter * - * @param \PDO + * @param \PDO $connection * @param \MongoSql\QueryBuilder\QueryBuilder $queryBuilder * @param callable [$handleCollectionDrop] * @return callable @@ -256,7 +256,7 @@ public function updateOne($filter, array $update): bool * Replace document * * @param array $filter - * @param array $update Data to replace to the matched documents + * @param array $replace - Data to replace to the matched documents * @return bool */ public function replaceOne(array $filter, array $replace): bool @@ -337,6 +337,8 @@ public function countDocuments($filter = []): int /** * Count documents * @note Deprecated in MongoDb 1.4 in favor of countDocuments + * @param array|callable [$filter] + * @return int */ public function count($filter = []): int { diff --git a/lib/MongoSql/Cursor.php b/lib/MongoSql/Cursor.php index e0f46d9..c6895ce 100644 --- a/lib/MongoSql/Cursor.php +++ b/lib/MongoSql/Cursor.php @@ -54,7 +54,7 @@ class Cursor implements IteratorAggregate, CursorInterface * @param \PDO $connection * @param string $collectionName * @param array|callable $filter - * @param array $options { + * @param array [$options] { * @var array [$sort] * @var int [$limit] * @var int [$skip] @@ -168,7 +168,7 @@ public function getIterator(): Traversable /** * Compile projection * - * @param array|null $projection + * @param array [$projection] * @return array */ protected static function compileProjection(array $projection = null): ?array diff --git a/lib/MongoSql/QueryBuilder/PgsqlQueryBuilder.php b/lib/MongoSql/QueryBuilder/PgsqlQueryBuilder.php index cb9cf8f..02d74bc 100644 --- a/lib/MongoSql/QueryBuilder/PgsqlQueryBuilder.php +++ b/lib/MongoSql/QueryBuilder/PgsqlQueryBuilder.php @@ -17,7 +17,7 @@ class PgsqlQueryBuilder extends QueryBuilder { /** * @inheritdoc - * @param bool $asObject - Get JSON object at as text + * @param bool [$asObject] - Get JSON object at as text */ public function createPathSelector(string $fieldName, bool $asText = true): string { diff --git a/lib/MongoSql/QueryBuilder/QueryBuilder.php b/lib/MongoSql/QueryBuilder/QueryBuilder.php index 9d256a2..a31800a 100644 --- a/lib/MongoSql/QueryBuilder/QueryBuilder.php +++ b/lib/MongoSql/QueryBuilder/QueryBuilder.php @@ -29,7 +29,7 @@ abstract class QueryBuilder /** * Constructor * - * @param callable $connectionQuote - Connection quite callable + * @param callable $connectionQuote - Connection quote callable */ public function __construct(callable $connectionQuote) { @@ -87,7 +87,7 @@ protected static function splitPath(string $path): array /** * Build ORDER BY subquery * - * @param array|null $sorts + * @param array [$sorts] * @return string|null */ public function buildOrderby(array $sorts = null): ?string @@ -113,8 +113,8 @@ public function buildOrderby(array $sorts = null): ?string /** * Build LIMIT subquery * - * @param int|null $limit - * @param int|null $offset + * @param int [$limit] + * @param int [$offset] * @return string|null */ public function buildLimit(int $limit = null, int $offset = null): ?string @@ -135,7 +135,7 @@ public function buildLimit(int $limit = null, int $offset = null): ?string /** * Build WHERE subquery * - * @param array|null $criteria + * @param array [$criteria] * @return string|null */ public function buildWhere(array $criteria = null): ?string @@ -157,7 +157,7 @@ public function buildWhere(array $criteria = null): ?string * @see \MongoLite\Database\UtilArrayQuery::buildCondition * * @param array $criteria - * @param string $concat + * @param string [$concat] * @return string|null */ protected function buildWhereSegments(array $criteria, string $concat = self::GLUE_OPERATOR_AND): ?string