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

lmc-eu / matej-client-php / 7529439147

15 Jan 2024 01:18PM UTC coverage: 100.0%. Remained the same
7529439147

Pull #145

github

web-flow
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>
Pull Request #145: Bump actions/checkout from 3 to 4

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/Exception/LogicException.php
1
<?php declare(strict_types=1);
2

3
namespace Lmc\Matej\Exception;
4

5
use Lmc\Matej\Model\Command\UserAwareInterface;
6

7
/**
8
 * Exception represents error in the program logic.
9
 */
10
class LogicException extends \LogicException implements MatejExceptionInterface
11
{
12
    public static function forInconsistentUserId(
13
        UserAwareInterface $mainCommand,
14
        UserAwareInterface $additionalCommand
15
    ): self {
16
        $message = sprintf(
14✔
17
            'User in %s command ("%s") must be the same as user in %s command ("%s")',
14✔
18
            (new \ReflectionClass($additionalCommand))->getShortName(),
14✔
19
            $additionalCommand->getUserId(),
14✔
20
            (new \ReflectionClass($mainCommand))->getShortName(),
14✔
21
            $mainCommand->getUserId()
14✔
22
        );
14✔
23

24
        return new self($message);
14✔
25
    }
26

27
    public static function forInconsistentUserMergeAndInteractionCommand(
28
        string $userMergeId,
29
        string $interactionUserId
30
    ): self {
31
        $message = sprintf(
7✔
32
            'Source user in UserMerge command ("%s") must be the same as user in Interaction command ("%s")',
7✔
33
            $userMergeId,
7✔
34
            $interactionUserId
7✔
35
        );
7✔
36

37
        return new self($message);
7✔
38
    }
39

40
    public static function forClassNotExtendingOtherClass(string $class, string $wantedClass): self
41
    {
42
        return new self(sprintf('Class %s has to be instance or subclass of %s.', $class, $wantedClass));
7✔
43
    }
44
}
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

© 2025 Coveralls, Inc