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

tochka-developers / queue-promises / 9935584685

15 Jul 2024 07:44AM UTC coverage: 47.259% (-18.3%) from 65.524%
9935584685

push

github

darkdarin
fix: tests

4 of 4 new or added lines in 2 files covered. (100.0%)

431 existing lines in 40 files now uncovered.

612 of 1295 relevant lines covered (47.26%)

2.53 hits per line

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

0.0
/src/Registry/PromiseEventRegistry.php
1
<?php
2

3
namespace Tochka\Promises\Registry;
4

5
use Illuminate\Support\Collection;
6
use Tochka\Promises\Models\PromiseEvent;
7
use Tochka\Promises\Support\WaitEvent;
8

9
/**
10
 * Связь WaitEvent с сущностью в БД
11
 */
12
class PromiseEventRegistry implements PromiseEventRegistryInterface
13
{
14
    /**
15
     * @param string $event_name
16
     * @param string $event_unique_id
17
     * @return Collection<array-key, WaitEvent>
18
     */
19
    public function loadByEvent(string $event_name, string $event_unique_id): Collection
20
    {
UNCOV
21
        return PromiseEvent::byEvent($event_name, $event_unique_id)
×
UNCOV
22
            ->get()
×
UNCOV
23
            ->map(
×
UNCOV
24
                function (PromiseEvent $promiseEventModel): WaitEvent {
×
UNCOV
25
                    return $promiseEventModel->getWaitEvent();
×
UNCOV
26
                },
×
UNCOV
27
            );
×
28
    }
29

30
    public function save(WaitEvent $waitEvent): void
31
    {
UNCOV
32
        PromiseEvent::saveWaitEvent($waitEvent);
×
33
    }
34

35
    /**
36
     * @throws \Exception
37
     */
38
    public function delete(int $id): void
39
    {
UNCOV
40
        PromiseEvent::where('id', $id)
×
UNCOV
41
            ->delete();
×
42
    }
43
}
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