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

daycry / jobs / 24850441053

23 Apr 2026 05:54PM UTC coverage: 52.404% (-1.5%) from 53.938%
24850441053

push

github

daycry
Fixes

104 of 219 new or added lines in 42 files covered. (47.49%)

14 existing lines in 9 files now uncovered.

1210 of 2309 relevant lines covered (52.4%)

4.37 hits per line

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

0.0
/src/Jobs/EventJob.php
1
<?php
2

3
declare(strict_types=1);
4

5
/**
6
 * This file is part of Daycry Queues.
7
 *
8
 * (c) Daycry <daycry9@proton.me>
9
 *
10
 * For the full copyright and license information, please view
11
 * the LICENSE file that was distributed with this source code.
12
 */
13

14
namespace Daycry\Jobs\Jobs;
15

16
use CodeIgniter\Events\Events;
17
use Daycry\Jobs\Exceptions\JobException;
18
use Daycry\Jobs\Interfaces\JobInterface;
19
use Daycry\Jobs\Job;
20
use Daycry\Jobs\Traits\InteractsWithCurrentJob;
21

22
/**
23
 * Triggers a CodeIgniter event.
24
 * Payload: ['name' => string, 'data' => array(optional)].
25
 */
26
class EventJob extends Job implements JobInterface
27
{
28
    use InteractsWithCurrentJob;
29

30
    public function handle(mixed $payload): mixed
31
    {
NEW
32
        if (! is_array($payload) || empty($payload['name']) || ! is_string($payload['name'])) {
×
NEW
33
            throw JobException::validationError('EventJob payload must be an array with a string "name" key.');
×
34
        }
35

UNCOV
36
        return Events::trigger($payload['name'], $payload['data'] ?? []);
×
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