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

ericfortmeyer / activity-log / 20488915339

24 Dec 2025 03:11PM UTC coverage: 49.13% (-2.7%) from 51.874%
20488915339

push

github

web-flow
fix: add support for emailing reports (#62)

Fixes #9

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

72 of 224 new or added lines in 12 files covered. (32.14%)

5 existing lines in 3 files now uncovered.

339 of 690 relevant lines covered (49.13%)

1.52 hits per line

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

0.0
/src/EmailReport.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace EricFortmeyer\ActivityLog;
6

7
use DateTimeImmutable;
8
use Phpolar\Model\AbstractModel;
9
use Phpolar\Model\Hidden;
10
use Phpolar\Phpolar\Auth\User;
11
use Phpolar\Validators\{
12
    MaxLength,
13
    Pattern
14
};
15

16
final class EmailReport extends AbstractModel
17
{
18
    #[Pattern("/^.+@[[:alnum:]]+\.[[:alpha:]]{1,3}/")]
19
    #[MaxLength(100)]
20
    public string $mailTo;
21

22
    #[Hidden]
23
    public string $year;
24

25
    #[Hidden]
26
    public int $month;
27

28
    public function getSubject(User $user): string
29
    {
NEW
30
        $month = DateTimeImmutable::createFromFormat("!m", (string)$this->month);
×
NEW
31
        return sprintf(
×
NEW
32
            "%s's Report for %s %d",
×
NEW
33
            $user->name,
×
NEW
34
            $month ? $month->format("F") : "",
×
NEW
35
            $this->year
×
NEW
36
        );
×
37
    }
38
}
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