Skip to content

Commit

Permalink
Fix docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-cz committed Apr 27, 2021
1 parent fdc1f5c commit 4104ce2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
8 changes: 5 additions & 3 deletions lib/MongoSql/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions lib/MongoSql/Cursor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/MongoSql/QueryBuilder/PgsqlQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
12 changes: 6 additions & 6 deletions lib/MongoSql/QueryBuilder/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 4104ce2

Please sign in to comment.