Test Failed
Push — master ( 8d8493...064df2 )
by Serhii
01:48 queued 11s
created

Mixed   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 14
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hp$0 ➔ search() 0 5 1
search() 0 5 ?
1
<?php
2
3
namespace Matchish\ScoutElasticSearch;
4
5
use Laravel\Scout\Builder;
6
use Laravel\Scout\Searchable;
7
use Illuminate\Database\Eloquent\Model;
8
9
final class Mixed
10
{
11
    /**
12
     * Perform a search against the model's indexed data.
13
     *
14
     * @param  string  $query
15
     * @param  \Closure  $callback
16
     * @return \Laravel\Scout\Builder
17
     */
18
    public static function search($query = '', $callback = null)
19
    {
20
        return new Builder(new class extends Model {
21
            use Searchable;
0 ignored issues
show
Bug introduced by
The trait Laravel\Scout\Searchable requires the property $queryCallback which is not provided by anonymous//src/Mixed.php$0.
Loading history...
22
        }, $query, $callback);
23
    }
24
}
25