Skip to content

Commit

Permalink
Fix: changed type hint of the second argument in the method `Executab…
Browse files Browse the repository at this point in the history
…leQueryObjectFactoryInterface::create()` to interface
  • Loading branch information
tg666 committed Nov 25, 2020
1 parent 92810cd commit 68d606b
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 2 additions & 0 deletions src/ExecutableQueryObject.php
Original file line number Diff line number Diff line change
@@ -98,6 +98,8 @@ public function fetch()

/**
* {@inheritDoc}
*
* @throws \Doctrine\ORM\NonUniqueResultException
*/
public function fetchOne(): ?object
{
4 changes: 2 additions & 2 deletions src/ExecutableQueryObjectFactory.php
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@

namespace SixtyEightPublishers\DoctrineQueryObjects;

use SixtyEightPublishers\DoctrineQueryObjects\ResultSet\ResultSetOptions;
use SixtyEightPublishers\DoctrineQueryObjects\QueryFactory\QueryFactoryInterface;
use SixtyEightPublishers\DoctrineQueryObjects\ResultSet\ResultSetOptionsInterface;

final class ExecutableQueryObjectFactory implements ExecutableQueryObjectFactoryInterface
{
@@ -23,7 +23,7 @@ public function __construct(QueryFactoryInterface $queryFactory)
/**
* {@inheritDoc}
*/
public function create(QueryObjectInterface $queryObject, ?ResultSetOptions $resultSetOptions = NULL): ExecutableQueryObjectInterface
public function create(QueryObjectInterface $queryObject, ?ResultSetOptionsInterface $resultSetOptions = NULL): ExecutableQueryObjectInterface
{
return new ExecutableQueryObject($queryObject, $this->queryFactory, $resultSetOptions);
}
8 changes: 4 additions & 4 deletions src/ExecutableQueryObjectFactoryInterface.php
Original file line number Diff line number Diff line change
@@ -4,15 +4,15 @@

namespace SixtyEightPublishers\DoctrineQueryObjects;

use SixtyEightPublishers\DoctrineQueryObjects\ResultSet\ResultSetOptions;
use SixtyEightPublishers\DoctrineQueryObjects\ResultSet\ResultSetOptionsInterface;

interface ExecutableQueryObjectFactoryInterface
{
/**
* @param \SixtyEightPublishers\DoctrineQueryObjects\QueryObjectInterface $queryObject
* @param \SixtyEightPublishers\DoctrineQueryObjects\ResultSet\ResultSetOptions|null $resultSetOptions
* @param \SixtyEightPublishers\DoctrineQueryObjects\QueryObjectInterface $queryObject
* @param \SixtyEightPublishers\DoctrineQueryObjects\ResultSet\ResultSetOptionsInterface|NULL $resultSetOptions
*
* @return \SixtyEightPublishers\DoctrineQueryObjects\ExecutableQueryObjectInterface
*/
public function create(QueryObjectInterface $queryObject, ?ResultSetOptions $resultSetOptions = NULL): ExecutableQueryObjectInterface;
public function create(QueryObjectInterface $queryObject, ?ResultSetOptionsInterface $resultSetOptions = NULL): ExecutableQueryObjectInterface;
}
4 changes: 1 addition & 3 deletions src/ExecutableQueryObjectInterface.php
Original file line number Diff line number Diff line change
@@ -21,9 +21,7 @@ public function count(?Paginator $paginator = NULL): int;
public function fetch();

/**
* @return object|NULL
*
* @throws \Doctrine\ORM\NonUniqueResultException
* @return object|NULL|mixed
*/
public function fetchOne(): ?object;
}

0 comments on commit 68d606b

Please sign in to comment.