forked from Happyr/Doctrine-Specification
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from peter-gribanov/analysis-qrJVZx
Apply fixes from StyleCI
- Loading branch information
Showing
17 changed files
with
147 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,59 @@ | ||
<?php | ||
|
||
namespace Happyr\DoctrineSpecification; | ||
|
||
use Doctrine\Common\Collections\Selectable; | ||
use Doctrine\Common\Persistence\ObjectRepository; | ||
use Happyr\DoctrineSpecification\Filter\Filter; | ||
use Happyr\DoctrineSpecification\Query\QueryModifier; | ||
|
||
/** | ||
* This interface should be used by an EntityRepository implementing the Specification pattern. | ||
*/ | ||
interface EntitySpecificationRepositoryInterface extends ObjectRepository, Selectable | ||
{ | ||
/** | ||
* Get results when you match with a Specification. | ||
* | ||
* @param Filter|QueryModifier $specification | ||
* @param Result\ResultModifier $modifier | ||
* | ||
* @return mixed[] | ||
*/ | ||
function match($specification, Result\ResultModifier $modifier); | ||
|
||
/** | ||
* Get single result when you match with a Specification. | ||
* | ||
* @param Filter|QueryModifier $specification | ||
* @param Result\ResultModifier $modifier | ||
* | ||
* @throw Exception\NonUniqueException If more than one result is found | ||
* @throw Exception\NoResultException If no results found | ||
* | ||
* @return mixed | ||
*/ | ||
function matchSingleResult($specification, Result\ResultModifier $modifier); | ||
|
||
/** | ||
* Get single result or null when you match with a Specification. | ||
* | ||
* @param Filter|QueryModifier $specification | ||
* @param Result\ResultModifier $modifier | ||
* | ||
* @throw Exception\NonUniqueException If more than one result is found | ||
* | ||
* @return mixed|null | ||
*/ | ||
function matchOneOrNullResult($specification, Result\ResultModifier $modifier); | ||
|
||
/** | ||
* Prepare a Query with a Specification. | ||
* | ||
* @param Filter|QueryModifier $specification | ||
* @param Result\ResultModifier $modifier | ||
* | ||
* @return \Doctrine\ORM\Query | ||
*/ | ||
function getQuery($specification, Result\ResultModifier $modifier); | ||
} | ||
<?php | ||
|
||
namespace Happyr\DoctrineSpecification; | ||
|
||
use Doctrine\Common\Collections\Selectable; | ||
use Doctrine\Common\Persistence\ObjectRepository; | ||
use Happyr\DoctrineSpecification\Filter\Filter; | ||
use Happyr\DoctrineSpecification\Query\QueryModifier; | ||
|
||
/** | ||
* This interface should be used by an EntityRepository implementing the Specification pattern. | ||
*/ | ||
interface EntitySpecificationRepositoryInterface extends ObjectRepository, Selectable | ||
{ | ||
/** | ||
* Get results when you match with a Specification. | ||
* | ||
* @param Filter|QueryModifier $specification | ||
* @param Result\ResultModifier $modifier | ||
* | ||
* @return mixed[] | ||
*/ | ||
public function match($specification, Result\ResultModifier $modifier); | ||
|
||
/** | ||
* Get single result when you match with a Specification. | ||
* | ||
* @param Filter|QueryModifier $specification | ||
* @param Result\ResultModifier $modifier | ||
* | ||
* @throw Exception\NonUniqueException If more than one result is found | ||
* @throw Exception\NoResultException If no results found | ||
* | ||
* @return mixed | ||
*/ | ||
public function matchSingleResult($specification, Result\ResultModifier $modifier); | ||
|
||
/** | ||
* Get single result or null when you match with a Specification. | ||
* | ||
* @param Filter|QueryModifier $specification | ||
* @param Result\ResultModifier $modifier | ||
* | ||
* @throw Exception\NonUniqueException If more than one result is found | ||
* | ||
* @return mixed|null | ||
*/ | ||
public function matchOneOrNullResult($specification, Result\ResultModifier $modifier); | ||
|
||
/** | ||
* Prepare a Query with a Specification. | ||
* | ||
* @param Filter|QueryModifier $specification | ||
* @param Result\ResultModifier $modifier | ||
* | ||
* @return \Doctrine\ORM\Query | ||
*/ | ||
public function getQuery($specification, Result\ResultModifier $modifier); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.