Changes for beta10 (#5)

- Add In/InArray support
- Add ORDER BY support for `Find` functions
- Update dependencies
- Implement fixes identified via static analysis

Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
2024-09-27 02:15:00 +00:00
parent 9e0e663811
commit d067f8983f
66 changed files with 1728 additions and 664 deletions

View File

@@ -10,10 +10,15 @@ namespace BitBadger\PDODocument\Mapper;
/**
* A mapper that returns the associative array from the database
*
* @implements Mapper<array<string|int, mixed>>
*/
class ArrayMapper implements Mapper
{
/** @inheritDoc */
/**
* @inheritDoc
* @return array<string|int, mixed> The array given as the parameter
*/
public function map(array $result): array
{
return $result;

View File

@@ -10,6 +10,8 @@ namespace BitBadger\PDODocument\Mapper;
/**
* A mapper that returns the integer value of the first item in the results
*
* @implements Mapper<int>
*/
class CountMapper implements Mapper
{

View File

@@ -31,7 +31,7 @@ class DocumentMapper implements Mapper
/**
* Map a result to a domain class instance
*
* @param array $result An associative array representing a single database result
* @param array<string|int, mixed> $result An associative array representing a single database result
* @return TDoc The document, deserialized from its JSON representation
* @throws DocumentException If the JSON cannot be deserialized
*/

View File

@@ -13,6 +13,8 @@ use Exception;
/**
* Map an EXISTS result to a boolean value
*
* @implements Mapper<bool>
*/
class ExistsMapper implements Mapper
{

View File

@@ -18,7 +18,7 @@ interface Mapper
/**
* Map a result to the specified type
*
* @param array $result An associative array representing a single database result
* @param array<string|int, mixed> $result An associative array representing a single database result
* @return T The item mapped from the given result
*/
public function map(array $result): mixed;