@@ -31,11 +31,11 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | public function write($source, SpecificationInterface $specification, Compiler $compiler) |
| 33 | 33 | { |
| 34 | - if (!$this->targetAcceptable($source)) { |
|
| 34 | + if (!$this->targetAcceptable($source)){ |
|
| 35 | 35 | return null; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - if ($specification instanceof Specification\Filter\Postgres\ILike) { |
|
| 38 | + if ($specification instanceof Specification\Filter\Postgres\ILike){ |
|
| 39 | 39 | return $source->where( |
| 40 | 40 | $specification->getExpression(), |
| 41 | 41 | 'ILIKE', |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | class_exists(SelectQuery::class) |
| 57 | 57 | && $target instanceof SelectQuery |
| 58 | 58 | && $target->getDriver() instanceof PostgresDriver |
| 59 | - ) { |
|
| 59 | + ){ |
|
| 60 | 60 | return true; |
| 61 | 61 | } |
| 62 | 62 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | class_exists(Select::class) |
| 65 | 65 | && $target instanceof Select |
| 66 | 66 | && $target->buildQuery()->getDriver() instanceof PostgresDriver |
| 67 | - ) { |
|
| 67 | + ){ |
|
| 68 | 68 | return true; |
| 69 | 69 | } |
| 70 | 70 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | protected function fetchValue($value) |
| 81 | 81 | { |
| 82 | - if ($value instanceof Specification\ValueInterface) { |
|
| 82 | + if ($value instanceof Specification\ValueInterface){ |
|
| 83 | 83 | throw new CompilerException('Value expects user input, none given'); |
| 84 | 84 | } |
| 85 | 85 | |
@@ -31,11 +31,13 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | public function write($source, SpecificationInterface $specification, Compiler $compiler) |
| 33 | 33 | { |
| 34 | - if (!$this->targetAcceptable($source)) { |
|
| 34 | + if (!$this->targetAcceptable($source)) |
|
| 35 | + { |
|
| 35 | 36 | return null; |
| 36 | 37 | } |
| 37 | 38 | |
| 38 | - if ($specification instanceof Specification\Filter\Postgres\ILike) { |
|
| 39 | + if ($specification instanceof Specification\Filter\Postgres\ILike) |
|
| 40 | + { |
|
| 39 | 41 | return $source->where( |
| 40 | 42 | $specification->getExpression(), |
| 41 | 43 | 'ILIKE', |
@@ -79,7 +81,8 @@ discard block |
||
| 79 | 81 | */ |
| 80 | 82 | protected function fetchValue($value) |
| 81 | 83 | { |
| 82 | - if ($value instanceof Specification\ValueInterface) { |
|
| 84 | + if ($value instanceof Specification\ValueInterface) |
|
| 85 | + { |
|
| 83 | 86 | throw new CompilerException('Value expects user input, none given'); |
| 84 | 87 | } |
| 85 | 88 | |