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

lmc-eu / matej-client-php / 7536558481

15 Jan 2024 01:31PM UTC coverage: 100.0%. Remained the same
7536558481

push

github

OndraM
Bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

712 of 712 relevant lines covered (100.0%)

35.03 hits per line

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

100.0
/src/RequestBuilder/ForgetRequestBuilder.php
1
<?php declare(strict_types=1);
2

3
namespace Lmc\Matej\RequestBuilder;
4

5
use Fig\Http\Message\RequestMethodInterface;
6
use Lmc\Matej\Exception\LogicException;
7
use Lmc\Matej\Model\Assertion;
8
use Lmc\Matej\Model\Command\UserForget;
9
use Lmc\Matej\Model\Request;
10

11
class ForgetRequestBuilder extends AbstractRequestBuilder
12
{
13
    protected const ENDPOINT_PATH = '/forget';
14

15
    /** @var UserForget[] */
16
    protected $users = [];
17

18
    /** @return $this */
19
    public function addUser(UserForget $user): self
20
    {
21
        $this->users[] = $user;
28✔
22

23
        return $this;
28✔
24
    }
25

26
    /**
27
     * @param UserForget[] $users
28
     * @return $this
29
     */
30
    public function addUsers(array $users): self
31
    {
32
        foreach ($users as $user) {
7✔
33
            $this->addUser($user);
7✔
34
        }
35

36
        return $this;
7✔
37
    }
38

39
    public function build(): Request
40
    {
41
        if (empty($this->users)) {
28✔
42
            throw new LogicException(
7✔
43
                'At least one UserForget command must be added to the builder before sending the request'
7✔
44
            );
7✔
45
        }
46
        Assertion::batchSize($this->users);
21✔
47

48
        return new Request(static::ENDPOINT_PATH, RequestMethodInterface::METHOD_POST, $this->users, $this->requestId);
14✔
49
    }
50
}
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