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

bvlion / AppTanServer / 20205654148

14 Dec 2025 09:04AM UTC coverage: 25.627%. First build
20205654148

push

github

bvlion
format

12 of 49 new or added lines in 18 files covered. (24.49%)

143 of 558 relevant lines covered (25.63%)

0.8 hits per line

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

0.0
/src/Infrastructure/Persistence/SearchWord/PdoSearchWordEventRepository.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace App\Infrastructure\Persistence\SearchWord;
6

7
use App\Domain\SearchWordEvent\SearchWordEvent;
8
use App\Domain\SearchWordEvent\SearchWordEventRepository;
9
use PDO;
10

11
class PdoSearchWordEventRepository implements SearchWordEventRepository
12
{
13
  public function __construct(private PDO $pdo)
14
  {
NEW
15
  }
×
16

17
  public function save(SearchWordEvent $event): void
18
  {
19
    $sql = <<<SQL
×
20
      INSERT INTO search_word_events (
21
        package_name,
22
        word,
23
        event_type,
24
        event_weight,
25
        context,
26
        timestamp
27
      ) VALUES (
28
        :package_name,
29
        :word,
30
        :event_type,
31
        :event_weight,
32
        :context,
33
        :timestamp
34
      )
35
    SQL;
×
36

37
    $stmt = $this->pdo->prepare($sql);
×
38

39
    $contextJson = $event->getContext() !== null
×
NEW
40
    ? json_encode($event->getContext(), JSON_UNESCAPED_UNICODE)
×
NEW
41
    : null;
×
42

43
    $stmt->execute([
×
44
      ':package_name' => $event->getPackageName(),
×
45
      ':word' => $event->getWord(),
×
46
      ':event_type' => $event->getEventType()->value,
×
47
      ':event_weight' => $event->getEventWeight(),
×
48
      ':context' => $contextJson,
×
49
      ':timestamp' => $event->getTimestamp()->format('Y-m-d H:i:s'),
×
50
    ]);
×
51
  }
52
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc