Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| IsSearchable | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| fulltext | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| fulltextWeight | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Cosray\Field\Capability; |
| 6 | |
| 7 | use Cosray\Schema\FulltextWeight; |
| 8 | |
| 9 | trait IsSearchable |
| 10 | { |
| 11 | protected FulltextWeight|false|null $fulltextWeight = null; |
| 12 | |
| 13 | public function fulltext(FulltextWeight|false $fulltextWeight): static |
| 14 | { |
| 15 | $this->fulltextWeight = $fulltextWeight; |
| 16 | |
| 17 | return $this; |
| 18 | } |
| 19 | |
| 20 | public function fulltextWeight(): FulltextWeight|false|null |
| 21 | { |
| 22 | return $this->fulltextWeight; |
| 23 | } |
| 24 | } |