Skip to content

Commit 239ad55

Browse files
Remove superfluous check
1 parent 5cf5db8 commit 239ad55

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

src/Metadata/Parser/AnnotationParser.php

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -407,25 +407,23 @@ public function forMethod(string $className, string $methodName): MetadataCollec
407407
}
408408
}
409409

410-
if (method_exists($className, $methodName)) {
411-
try {
412-
$result = array_merge(
413-
$result,
414-
$this->parseRequirements(
415-
AnnotationRegistry::getInstance()->forMethod($className, $methodName)->requirements(),
416-
'method',
417-
),
418-
);
419-
} catch (InvalidVersionRequirementException $e) {
420-
EventFacade::emitter()->testRunnerTriggeredPhpunitWarning(
421-
sprintf(
422-
'Method %s::%s is annotated using an invalid version requirement: %s',
423-
$className,
424-
$methodName,
425-
$e->getMessage(),
426-
),
427-
);
428-
}
410+
try {
411+
$result = array_merge(
412+
$result,
413+
$this->parseRequirements(
414+
AnnotationRegistry::getInstance()->forMethod($className, $methodName)->requirements(),
415+
'method',
416+
),
417+
);
418+
} catch (InvalidVersionRequirementException $e) {
419+
EventFacade::emitter()->testRunnerTriggeredPhpunitWarning(
420+
sprintf(
421+
'Method %s::%s is annotated using an invalid version requirement: %s',
422+
$className,
423+
$methodName,
424+
$e->getMessage(),
425+
),
426+
);
429427
}
430428

431429
if (!empty($result) &&

0 commit comments

Comments
 (0)