Skip to content

Commit

Permalink
Make sure we return an instance of AndX/OrX
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm committed Jun 6, 2015
1 parent 934cf56 commit 6ea70f5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Spec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use Happyr\DoctrineSpecification\Filter\Filter;
use Happyr\DoctrineSpecification\Filter\IsNotNull;
use Happyr\DoctrineSpecification\Logic\AndX;
use Happyr\DoctrineSpecification\Logic\OrX;
use Happyr\DoctrineSpecification\Query\GroupBy;
use Happyr\DoctrineSpecification\Query\InnerJoin;
use Happyr\DoctrineSpecification\Query\LeftJoin;
Expand All @@ -16,7 +18,6 @@
use Happyr\DoctrineSpecification\Filter\In;
use Happyr\DoctrineSpecification\Filter\Like;
use Happyr\DoctrineSpecification\Filter\IsNull;
use Happyr\DoctrineSpecification\Logic\LogicX;
use Happyr\DoctrineSpecification\Logic\Not;
use Happyr\DoctrineSpecification\Query\Join;
use Happyr\DoctrineSpecification\Result\Cache;
Expand All @@ -35,12 +36,12 @@ class Spec

public static function andX()
{
return new LogicX(LogicX::AND_X, func_get_args());
return new AndX(func_get_args());
}

public static function orX()
{
return new LogicX(LogicX::OR_X, func_get_args());
return new OrX(func_get_args());
}

public static function not(Filter $spec)
Expand Down

0 comments on commit 6ea70f5

Please sign in to comment.