From ab8669501009ebd053779be63813cc7be7595563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 21 May 2024 06:10:59 +0000 Subject: [PATCH] Fix typos --- src/DocBlock/StandardTagFactory.php | 4 ++-- src/DocBlock/Tags/InvalidTag.php | 2 +- src/Utils.php | 2 +- .../integration/InterpretingDocBlocksTest.php | 20 +++++++++---------- .../unit/DocBlock/StandardTagFactoryTest.php | 2 +- tests/unit/DocBlock/Tags/AuthorTest.php | 2 +- tests/unit/DocBlock/Tags/ExampleTest.php | 2 +- tests/unit/DocBlock/Tags/VarTest.php | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/DocBlock/StandardTagFactory.php b/src/DocBlock/StandardTagFactory.php index 7360a707..61ad9be8 100644 --- a/src/DocBlock/StandardTagFactory.php +++ b/src/DocBlock/StandardTagFactory.php @@ -102,7 +102,7 @@ final class StandardTagFactory implements TagFactory ]; /** - * @var array> An array with a anotation s a key, and an + * @var array> An array with an annotation as a key, and an * FQCN to a class that handles it as an array value. */ private array $annotationMappings = []; @@ -323,7 +323,7 @@ private function fetchParametersForHandlerFactoryMethod($handler): array * Returns a copy of this class' Service Locator with added dynamic parameters, * such as the tag's name, body and Context. * - * @param TypeContext $context The Context (namespace and aliasses) that may be + * @param TypeContext $context The Context (namespace and aliases) that may be * passed and is used to resolve FQSENs. * @param string $tagName The name of the tag that may be * passed onto the factory method of the Tag class. diff --git a/src/DocBlock/Tags/InvalidTag.php b/src/DocBlock/Tags/InvalidTag.php index c7d3cd54..05944ab9 100644 --- a/src/DocBlock/Tags/InvalidTag.php +++ b/src/DocBlock/Tags/InvalidTag.php @@ -27,7 +27,7 @@ * we cannot simply throw exceptions at all time because the exceptions will break the creation of a * docklock. Just silently ignore the exceptions is not an option because the user as an issue to fix. * - * This tag holds that error information until a using application is able to display it. The object wil just behave + * This tag holds that error information until a using application is able to display it. The object will just behave * like any normal tag. So the normal application flow will not break. */ final class InvalidTag implements Tag diff --git a/src/Utils.php b/src/Utils.php index ddd0f61d..fe311c9e 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -26,7 +26,7 @@ abstract class Utils * * This function is inspired by {@link https://github.com/thecodingmachine/safe/blob/master/generated/pcre.php}. But * since this library is all about performance we decided to strip everything we don't need. Reducing the amount - * of files that have to be loaded, ect. + * of files that have to be loaded, etc. * * @param string $pattern The pattern to search for, as a string. * @param string $subject The input string. diff --git a/tests/integration/InterpretingDocBlocksTest.php b/tests/integration/InterpretingDocBlocksTest.php index d1e3b4e4..c901f5ca 100644 --- a/tests/integration/InterpretingDocBlocksTest.php +++ b/tests/integration/InterpretingDocBlocksTest.php @@ -169,7 +169,7 @@ public function testDescriptionsCanEscapeAtSignsAndClosingBraces(): void public function testMultilineTags(): void { - $docCommment = <<create($docCommment); + $docblock = $factory->create($docComment); self::assertEquals( [ @@ -201,7 +201,7 @@ public function testMultilineTags(): void public function testMethodRegression(): void { - $docCommment = <<create($docCommment); + $docblock = $factory->create($docComment); self::assertEquals( [ @@ -231,7 +231,7 @@ public function testMethodRegression(): void public function testInvalidTypeParamResultsInInvalidTag(): void { - $docCommment = ' + $docComment = ' /** * This is an example of a summary. * @@ -239,7 +239,7 @@ public function testInvalidTypeParamResultsInInvalidTag(): void */ '; $factory = DocBlockFactory::createInstance(); - $docblock = $factory->create($docCommment); + $docblock = $factory->create($docComment); self::assertEquals( [ @@ -257,14 +257,14 @@ public function testInvalidTypeParamResultsInInvalidTag(): void public function testConstantReferenceTypes(): void { - $docCommment = <<create($docCommment); + $docblock = $factory->create($docComment); self::assertEquals( [ @@ -276,7 +276,7 @@ public function testConstantReferenceTypes(): void public function testRegressionWordpressDocblocks(): void { - $docCommment = <<create($docCommment); + $docblock = $factory->create($docComment); self::assertEquals( new DocBlock( diff --git a/tests/unit/DocBlock/StandardTagFactoryTest.php b/tests/unit/DocBlock/StandardTagFactoryTest.php index 5a954d52..8dfced71 100644 --- a/tests/unit/DocBlock/StandardTagFactoryTest.php +++ b/tests/unit/DocBlock/StandardTagFactoryTest.php @@ -505,7 +505,7 @@ public function validTagProvider(): array 'tag', '@tag some text', ], - 'tag body starting with sqare brackets is allowed' => [ + 'tag body starting with square brackets is allowed' => [ '@tag [is valid]', 'tag', '@tag [is valid]', diff --git a/tests/unit/DocBlock/Tags/AuthorTest.php b/tests/unit/DocBlock/Tags/AuthorTest.php index 99a1a5ad..a1ce4321 100644 --- a/tests/unit/DocBlock/Tags/AuthorTest.php +++ b/tests/unit/DocBlock/Tags/AuthorTest.php @@ -139,7 +139,7 @@ public function testStringRepresentationIsReturnedWithoutName(): void * @covers ::__construct * @covers ::__toString */ - public function testStringRepresentationWithEmtpyEmail(): void + public function testStringRepresentationWithEmptyEmail(): void { $fixture = new Author('Mike van Riel', ''); diff --git a/tests/unit/DocBlock/Tags/ExampleTest.php b/tests/unit/DocBlock/Tags/ExampleTest.php index 7e60980d..77bf5a34 100644 --- a/tests/unit/DocBlock/Tags/ExampleTest.php +++ b/tests/unit/DocBlock/Tags/ExampleTest.php @@ -67,7 +67,7 @@ public function testStartlineIsParsed(): void * @covers ::getStartingLine * @covers ::getDescription */ - public function testAllowOmitingLineCount(): void + public function testAllowOmittingLineCount(): void { $tag = Example::create('"example1.php" 10 some text'); $this->assertEquals('example1.php', $tag->getFilePath()); diff --git a/tests/unit/DocBlock/Tags/VarTest.php b/tests/unit/DocBlock/Tags/VarTest.php index 740c596b..00af8ae6 100644 --- a/tests/unit/DocBlock/Tags/VarTest.php +++ b/tests/unit/DocBlock/Tags/VarTest.php @@ -56,7 +56,7 @@ public function testIfCorrectTagNameIsReturned(): void * * @covers \phpDocumentor\Reflection\DocBlock\Tags\BaseTag::render */ - public function testIfVariableNameIsOmmitedIfEmpty(): void + public function testIfVariableNameIsOmittedIfEmpty(): void { $fixture = new Var_('', null, null);