diff --git a/Loader/AnnotationFileLoader.php b/Loader/AnnotationFileLoader.php index a1d70c0f..e75eac11 100644 --- a/Loader/AnnotationFileLoader.php +++ b/Loader/AnnotationFileLoader.php @@ -87,7 +87,7 @@ protected function findClass(string $file) $tokens = token_get_all(file_get_contents($file)); if (1 === \count($tokens) && \T_INLINE_HTML === $tokens[0][0]) { - throw new \InvalidArgumentException(sprintf('The file "%s" does not contain PHP code. Did you forgot to add the " true, \T_STRING => true]; diff --git a/Tests/Loader/AnnotationFileLoaderTest.php b/Tests/Loader/AnnotationFileLoaderTest.php index 9cc38430..888bb07c 100644 --- a/Tests/Loader/AnnotationFileLoaderTest.php +++ b/Tests/Loader/AnnotationFileLoaderTest.php @@ -45,7 +45,7 @@ public function testLoadTraitWithClassConstant() public function testLoadFileWithoutStartTag() { $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('Did you forgot to add the "expectExceptionMessage('Did you forget to add the "loader->load(__DIR__.'/../Fixtures/OtherAnnotatedClasses/NoStartTagClass.php'); }