File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -48,11 +48,16 @@ private function shouldProcessNode(Node $node): bool
48
48
49
49
private function getErrorMessage (Include_ $ node , string $ filePath ): RuleError
50
50
{
51
- $ message = match ($ node ->type ) {
52
- Include_::TYPE_REQUIRE => 'Path in require() "%s" is not a file or it does not exist. ' ,
53
- Include_::TYPE_REQUIRE_ONCE => 'Path in require_once() "%s" is not a file or it does not exist. ' ,
54
- default => throw new ShouldNotHappenException ('Rule should have already validated the node type. ' )
55
- };
51
+ switch ($ node ->type ) {
52
+ case Include_::TYPE_REQUIRE :
53
+ $ message = 'Path in require() "%s" is not a file or it does not exist. ' ;
54
+ break ;
55
+ case Include_::TYPE_REQUIRE_ONCE :
56
+ $ message = 'Path in require_once() "%s" is not a file or it does not exist. ' ;
57
+ break ;
58
+ default :
59
+ throw new ShouldNotHappenException ('Rule should have already validated the node type. ' );
60
+ }
56
61
57
62
return RuleErrorBuilder::message (
58
63
sprintf (
You can’t perform that action at this time.
0 commit comments