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

nepada / phpstan-message-bus / 7479273796

10 Jan 2024 06:30PM UTC coverage: 85.075%. Remained the same
7479273796

Pull #68

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 #68: Bump actions/checkout from 3 to 4

57 of 67 relevant lines covered (85.07%)

1.39 hits per line

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

66.67
/src/MessageBus/CommandTypeExtractor.php
1
<?php
2
declare(strict_types = 1);
3

4
namespace Nepada\PHPStan\MessageBus;
5

6
use PhpParser\Node\Expr\MethodCall;
7
use PhpParser\Node\VariadicPlaceholder;
8
use PHPStan\Analyser\Scope;
9
use PHPStan\Type\TypeWithClassName;
10

11
class CommandTypeExtractor
12
{
13

14
    public function extractCommandType(MethodCall $methodCall, Scope $scope): ?string
15
    {
16
        if (count($methodCall->args) === 0) {
2✔
17
            return null;
×
18
        }
19

20
        $commandArgument = $methodCall->args[0];
2✔
21
        if ($commandArgument instanceof VariadicPlaceholder) {
2✔
22
            return null;
×
23
        }
24

25
        $commandType = $scope->getType($commandArgument->value);
2✔
26
        if (! $commandType instanceof TypeWithClassName) {
2✔
27
            return null;
×
28
        }
29

30
        return $commandType->getClassName();
2✔
31
    }
32

33
}
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