• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

heimrichhannot / contao-utils-bundle / 38411311194

13 Oct 2026 02:11PM UTC coverage: 83.697% (+3.9%) from 79.825%
38411311194

Pull #108

github

koertho
apply rector

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pull Request #108: add search vector field

339 of 352 new or added lines in 16 files covered. (96.31%)

1535 of 1834 relevant lines covered (83.7%)

8.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/src/Event/BuildSearchVectorEvent.php
1
<?php
2

3
namespace HeimrichHannot\UtilsBundle\Event;
4

5
use Symfony\Contracts\EventDispatcher\Event;
6

7
/**
8
 * Dispatched before a search vector is tokenized and stored.
9
 *
10
 * Use it to add values that are not stored in a column of the record, for example tags or other relations kept in a
11
 * separate table, or to remove values that should not be searchable.
12
 */
13
class BuildSearchVectorEvent extends Event
14
{
15
    /**
16
     * @param array<string, mixed> $row    The raw database row
17
     * @param list<string>         $values The formatted, not yet tokenized values. Each value stays a separate
18
     *                                     section of the vector, so a quoted phrase never matches across two values.
19
     * @param string               $locale The language of the record, the values are resolved and stemmed in
20
     */
21
    public function __construct(
22
        public readonly string $table,
23
        public readonly array $row,
24
        private array $values,
25
        public readonly string $locale,
26
    ) {}
15 ✔
27

28
    /**
29
     * @return list<string>
30
     */
31
    public function getValues(): array
32
    {
33
        return $this->values;
15 ✔
34
    }
35

36
    /**
37
     * @param list<string> $values
38
     */
39
    public function setValues(array $values): void
40
    {
NEW
41
        $this->values = \array_values($values);
×
42
    }
43

44
    public function addValue(string $value): void
45
    {
46
        $this->values[] = $value;
1 ✔
47
    }
48
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc