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

nepada / message-bus / 4581487412

pending completion
4581487412

push

github

GitHub
Update spaze/phpstan-disallowed-calls requirement from 2.11.6 to 2.12.1 (#75)

303 of 315 relevant lines covered (96.19%)

0.96 hits per line

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

87.5
/src/MessageBus/StaticAnalysis/Rules/ClassHasPublicMethodRule.php
1
<?php
2
declare(strict_types = 1);
3

4
namespace Nepada\MessageBus\StaticAnalysis\Rules;
5

6
use Nepada\MessageBus\StaticAnalysis\ReflectionHelper;
7
use Nepada\MessageBus\StaticAnalysis\StaticAnalysisFailedException;
8

9
final class ClassHasPublicMethodRule
10
{
11

12
    private string $methodName;
13

14
    public function __construct(string $methodName)
1✔
15
    {
16
        $this->methodName = $methodName;
1✔
17
    }
1✔
18

19
    /**
20
     * @param class-string $type
21
     * @throws StaticAnalysisFailedException
22
     */
23
    public function validate(string $type): void
1✔
24
    {
25
        $method = ReflectionHelper::requireMethodReflection($type, $this->methodName);
1✔
26

27
        if (! $method->isPublic()) {
1✔
28
            throw StaticAnalysisFailedException::with(sprintf('Method "%s" is not public', $this->methodName), $type);
×
29
        }
30
    }
1✔
31

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