Search   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 11
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A score() 0 3 1
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