Test Failed
Pull Request — master (#161)
by
unknown
06:47
created

Mixed.php$0 ➔ search()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Matchish\ScoutElasticSearch;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Laravel\Scout\Builder;
7
use Laravel\Scout\Searchable;
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