File tree 2 files changed +6
-11
lines changed
2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class QueryBuilder
31
31
*/
32
32
public function __construct (Version $ version = null )
33
33
{
34
- $ this ->_version = $ version ?: new Version \Latest ();
34
+ $ this ->_version = $ version ?? new Version \Latest ();
35
35
36
36
$ this ->addDSL (new DSL \Query ());
37
37
$ this ->addDSL (new DSL \Aggregation ());
@@ -41,14 +41,9 @@ public function __construct(Version $version = null)
41
41
/**
42
42
* Returns Facade for custom DSL object.
43
43
*
44
- * @param $dsl
45
- * @param array $arguments
46
- *
47
44
* @throws QueryBuilderException
48
- *
49
- * @return Facade
50
45
*/
51
- public function __call ($ dsl , array $ arguments )
46
+ public function __call (string $ dsl , array $ arguments ): Facade
52
47
{
53
48
if (false === isset ($ this ->_facades [$ dsl ])) {
54
49
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