Search::score()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace BEdita\ElasticSearch\Model\Document;
5
6
use Cake\ElasticSearch\Document;
7
8
/**
9
 * Base searchable document.
10
 *
11
 * @property int|string $id Document ID.
12
 */
13
class Search extends Document
14
{
15
    /**
16
     * Returns the score of this document as returned by ElasticSearch after search.
17
     *
18
     * @return float|null
19
     * @codeCoverageIgnore
20
     */
21
    public function score(): float|null
22
    {
23
        return $this->_result?->getScore();
24
    }
25
}
26