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

ericfortmeyer / activity-log / 20521974594

26 Dec 2025 11:53AM UTC coverage: 43.123% (-6.0%) from 49.13%
20521974594

push

github

web-flow
feat: add webhook for deployments (#63)

Signed-off-by: Eric Fortmeyer <e.fortmeyer01@gmail.com>

11 of 128 new or added lines in 13 files covered. (8.59%)

1 existing line in 1 file now uncovered.

348 of 807 relevant lines covered (43.12%)

1.33 hits per line

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

17.65
/src/Services/AppConfigService.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace EricFortmeyer\ActivityLog\Services;
6

7
use EricFortmeyer\ActivityLog\AppConfig;
8
use Phpolar\Storage\StorageContext;
9
use SQLite3;
10

11
class AppConfigService
12
{
13
    /**
14
     * @param StorageContext<array<string,string>> $readStorage
15
     */
16
    public function __construct(
17
        private readonly StorageContext $readStorage,
18
        private readonly SQLite3 $writeConnection,
19
    ) {}
2✔
20

21
    public function get(): AppConfig|false
22
    {
23
        /**
24
         * @var array<int,array<string,string>>
25
         */
26
        $configValues = $this->readStorage->findAll();
2✔
27

28
        return count($configValues) > 0 ? new AppConfig($configValues[0]) : false;
2✔
29
    }
30

31
    public function updateVersion(
32
        string $version
33
    ): bool {
NEW
34
        $currentConfig = $this->get();
×
35

NEW
36
        if ($currentConfig === false) {
×
NEW
37
            return false;
×
38
        }
39

NEW
40
        $currentConfig->version = $version;
×
41

NEW
42
        if ($currentConfig->isValid() === false) {
×
NEW
43
            return false;
×
44
        }
45

NEW
46
        $stmt = $this->writeConnection->prepare(
×
NEW
47
            <<<SQL
×
48
            UPDATE activity_log_config
49
            SET "version"=:version
50
            WHERE "id"=:id;
NEW
51
            SQL,
×
NEW
52
        );
×
53

NEW
54
        return $stmt !== false
×
NEW
55
            && $stmt->bindValue("id", $currentConfig->id) !== false
×
NEW
56
            && $stmt->bindValue("version", $version) !== false
×
NEW
57
            && $stmt->execute() !== false;
×
58
    }
59
}
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