Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #371

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/DocBlock/StandardTagFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ final class StandardTagFactory implements TagFactory
];

/**
* @var array<class-string<Tag>> An array with a anotation s a key, and an
* @var array<class-string<Tag>> An array with an annotation as a key, and an
* FQCN to a class that handles it as an array value.
*/
private array $annotationMappings = [];
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/DocBlock/Tags/InvalidTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
20 changes: 10 additions & 10 deletions tests/integration/InterpretingDocBlocksTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function testDescriptionsCanEscapeAtSignsAndClosingBraces(): void

public function testMultilineTags(): void
{
$docCommment = <<<DOC
$docComment = <<<DOC
/**
* This is an example of a summary.
*
Expand All @@ -180,7 +180,7 @@ public function testMultilineTags(): void
*/
DOC;
$factory = DocBlockFactory::createInstance();
$docblock = $factory->create($docCommment);
$docblock = $factory->create($docComment);

self::assertEquals(
[
Expand All @@ -201,15 +201,15 @@ public function testMultilineTags(): void

public function testMethodRegression(): void
{
$docCommment = <<<DOC
$docComment = <<<DOC
/**
* This is an example of a summary.
*
* @method void setInteger(integer \$integer)
*/
DOC;
$factory = DocBlockFactory::createInstance();
$docblock = $factory->create($docCommment);
$docblock = $factory->create($docComment);

self::assertEquals(
[
Expand All @@ -231,15 +231,15 @@ public function testMethodRegression(): void

public function testInvalidTypeParamResultsInInvalidTag(): void
{
$docCommment = '
$docComment = '
/**
* This is an example of a summary.
*
* @param array\Foo> $test
*/
';
$factory = DocBlockFactory::createInstance();
$docblock = $factory->create($docCommment);
$docblock = $factory->create($docComment);

self::assertEquals(
[
Expand All @@ -257,14 +257,14 @@ public function testInvalidTypeParamResultsInInvalidTag(): void

public function testConstantReferenceTypes(): void
{
$docCommment = <<<DOC
$docComment = <<<DOC
/**
* @return self::STATUS_*
*/
DOC;

$factory = DocBlockFactory::createInstance();
$docblock = $factory->create($docCommment);
$docblock = $factory->create($docComment);

self::assertEquals(
[
Expand All @@ -276,7 +276,7 @@ public function testConstantReferenceTypes(): void

public function testRegressionWordpressDocblocks(): void
{
$docCommment = <<<DOC
$docComment = <<<DOC
/**
* Install a package.
*
Expand Down Expand Up @@ -311,7 +311,7 @@ public function testRegressionWordpressDocblocks(): void
DOC;

$factory = DocBlockFactory::createInstance();
$docblock = $factory->create($docCommment);
$docblock = $factory->create($docComment);

self::assertEquals(
new DocBlock(
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/DocBlock/StandardTagFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]',
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/DocBlock/Tags/AuthorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', '');

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/DocBlock/Tags/ExampleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/DocBlock/Tags/VarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Loading