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

valkyrjaio / valkyrja / 20156277091

12 Dec 2025 04:26AM UTC coverage: 73.416% (-0.6%) from 74.002%
20156277091

push

github

MelechMizrachi
CI: Trying to fix coveralls.

8125 of 11067 relevant lines covered (73.42%)

17.9 hits per line

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

0.0
/src/Valkyrja/Notification/Data/Notify.php
1
<?php
2

3
declare(strict_types=1);
4

5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <melechmizrachi@gmail.com>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13

14
namespace Valkyrja\Notification\Data;
15

16
use Override;
17
use Valkyrja\Broadcast\Data\Contract\Message as BroadcastMessage;
18
use Valkyrja\Mail\Data\Contract\Message as MailMessage;
19
use Valkyrja\Notification\Data\Contract\Notify as Contract;
20
use Valkyrja\Sms\Data\Contract\Message as SmsMessage;
21

22
/**
23
 * Abstract Class Notify.
24
 *
25
 * @author Melech Mizrachi
26
 */
27
abstract class Notify implements Contract
28
{
29
    /**
30
     * The broadcast adapter to use for this notification.
31
     *  Null ensures the default from config is used.
32
     *
33
     * @var string|null
34
     */
35
    protected static string|null $broadcastAdapter = null;
36

37
    /**
38
     * The broadcast message to use for this notification.
39
     *  Null ensures the default from config is used.
40
     *
41
     * @var string|null
42
     */
43
    protected static string|null $broadcastMessage = null;
44

45
    /**
46
     * @var bool
47
     */
48
    protected static bool $shouldSendBroadcast = true;
49

50
    /**
51
     * The mail adapter to use for this notification.
52
     *  Null ensures the default from config is used.
53
     *
54
     * @var string|null
55
     */
56
    protected static string|null $mailAdapter = null;
57

58
    /**
59
     * The mail message to use for this notification.
60
     *  Null ensures the default from config is used.
61
     *
62
     * @var string|null
63
     */
64
    protected static string|null $mailMessage = null;
65

66
    /**
67
     * @var bool
68
     */
69
    protected static bool $shouldSendMail = true;
70

71
    /**
72
     * The SMS adapter to use for this notification.
73
     *  Null ensures the default from config is used.
74
     *
75
     * @var string|null
76
     */
77
    protected static string|null $smsAdapter = null;
78

79
    /**
80
     * The SMS message to use for this notification.
81
     *  Null ensures the default from config is used.
82
     *
83
     * @var string|null
84
     */
85
    protected static string|null $smsMessage = null;
86

87
    /**
88
     * @var bool
89
     */
90
    protected static bool $shouldSendSms = true;
91

92
    /**
93
     * @inheritDoc
94
     */
95
    #[Override]
×
96
    public function getBroadcastAdapterName(): string|null
97
    {
98
        return static::$broadcastAdapter;
×
99
    }
100

101
    /**
102
     * @inheritDoc
103
     */
104
    #[Override]
×
105
    public function getBroadcastMessageName(): string|null
106
    {
107
        return static::$broadcastMessage;
×
108
    }
109

110
    /**
111
     * @inheritDoc
112
     */
113
    #[Override]
×
114
    public function shouldSendBroadcastMessage(): bool
115
    {
116
        return static::$shouldSendBroadcast;
×
117
    }
118

119
    /**
120
     * @inheritDoc
121
     */
122
    #[Override]
×
123
    public function getMailAdapterName(): string|null
124
    {
125
        return static::$mailAdapter;
×
126
    }
127

128
    /**
129
     * @inheritDoc
130
     */
131
    #[Override]
×
132
    public function getMailMessageName(): string|null
133
    {
134
        return static::$mailMessage;
×
135
    }
136

137
    /**
138
     * @inheritDoc
139
     */
140
    #[Override]
×
141
    public function shouldSendMailMessage(): bool
142
    {
143
        return static::$shouldSendMail;
×
144
    }
145

146
    /**
147
     * @inheritDoc
148
     */
149
    #[Override]
×
150
    public function getSmsAdapterName(): string|null
151
    {
152
        return static::$smsAdapter;
×
153
    }
154

155
    /**
156
     * @inheritDoc
157
     */
158
    #[Override]
×
159
    public function getSmsMessageName(): string|null
160
    {
161
        return static::$smsMessage;
×
162
    }
163

164
    /**
165
     * @inheritDoc
166
     */
167
    #[Override]
×
168
    public function shouldSendSmsMessage(): bool
169
    {
170
        return static::$shouldSendSms;
×
171
    }
172

173
    /**
174
     * @inheritDoc
175
     */
176
    #[Override]
×
177
    public function broadcast(BroadcastMessage $broadcastMessage): BroadcastMessage
178
    {
179
        return $broadcastMessage;
×
180
    }
181

182
    /**
183
     * @inheritDoc
184
     */
185
    #[Override]
×
186
    public function mail(MailMessage $mailMessage): MailMessage
187
    {
188
        return $mailMessage;
×
189
    }
190

191
    /**
192
     * @inheritDoc
193
     */
194
    #[Override]
×
195
    public function sms(SmsMessage $message): SmsMessage
196
    {
197
        return $message;
×
198
    }
199
}
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