File tree 2 files changed +6
-12
lines changed
2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,10 @@ class QueryBuilder
26
26
27
27
/**
28
28
* Constructor.
29
- *
30
- * @param Version $version
31
29
*/
32
30
public function __construct (Version $ version = null )
33
31
{
34
- $ this ->_version = $ version ?: new Version \Latest ();
32
+ $ this ->_version = $ version ?? new Version \Latest ();
35
33
36
34
$ this ->addDSL (new DSL \Query ());
37
35
$ this ->addDSL (new DSL \Aggregation ());
@@ -41,13 +39,9 @@ public function __construct(Version $version = null)
41
39
/**
42
40
* Returns Facade for custom DSL object.
43
41
*
44
- * @param $dsl
45
- *
46
42
* @throws QueryBuilderException
47
- *
48
- * @return Facade
49
43
*/
50
- public function __call ($ dsl , array $ arguments )
44
+ public function __call (string $ dsl , array $ arguments ): Facade
51
45
{
52
46
if (false === isset ($ this ->_facades [$ dsl ])) {
53
47
throw new QueryBuilderException ('DSL " ' .$ dsl .'" not supported ' );
Original file line number Diff line number Diff line change 9
9
*/
10
10
interface DSL
11
11
{
12
- const TYPE_QUERY = 'query ' ;
13
- const TYPE_AGGREGATION = 'aggregation ' ;
14
- const TYPE_SUGGEST = 'suggest ' ;
15
- const TYPE_COLLAPSE = 'collapse ' ;
12
+ public const TYPE_QUERY = 'query ' ;
13
+ public const TYPE_AGGREGATION = 'aggregation ' ;
14
+ public const TYPE_SUGGEST = 'suggest ' ;
15
+ public const TYPE_COLLAPSE = 'collapse ' ;
16
16
17
17
/**
18
18
* must return type for QueryBuilder usage.
You can’t perform that action at this time.
0 commit comments