@@ 31-42 (lines=12) @@ | ||
28 | * |
|
29 | * @return bool |
|
30 | */ |
|
31 | public function add($value) |
|
32 | { |
|
33 | if (! $value instanceof ModifierInterface) { |
|
34 | throw new InvalidArgumentException(sprintf( |
|
35 | '"%s" does not implement "%s"!', |
|
36 | (is_object($value)) ? get_class($value) : $value, |
|
37 | ModifierInterface::class |
|
38 | )); |
|
39 | } |
|
40 | ||
41 | return parent::add($value); |
|
42 | } |
|
43 | ||
44 | /** |
|
45 | * Modify the query (e.g. select more fields/relations). |
@@ 42-53 (lines=12) @@ | ||
39 | * |
|
40 | * @return bool |
|
41 | */ |
|
42 | public function add($value) |
|
43 | { |
|
44 | if (! $value instanceof SpecificationInterface) { |
|
45 | throw new InvalidArgumentException(sprintf( |
|
46 | '"%s" does not implement "%s"!', |
|
47 | (is_object($value)) ? get_class($value) : $value, |
|
48 | SpecificationInterface::class |
|
49 | )); |
|
50 | } |
|
51 | ||
52 | return parent::add($value); |
|
53 | } |
|
54 | ||
55 | /** |
|
56 | * {@inheritdoc} |