Skip to content

Commit

Permalink
chore: Fix typos (#7474)
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Nov 26, 2023
1 parent 61c6f72 commit 9901473
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 44 deletions.
50 changes: 25 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ Changelog for v3.23.0
---------------------

* bug: BlankLineBeforeStatementFixer - do not enforce/add a blank line when there is a blank line between the comment and the statement already (#7190)
* bug: Fix detecting classy invokation in catch (#7191)
* bug: Fix detecting classy invocation in catch (#7191)
* bug: Fix names resolving in `no_superfluous_phpdoc_tags` fixer (#7189)
* bug: Fix various bugs in `FullyQualifiedStrictTypesFixer` fixer (#7188)
* bug: Fixed line between general script documentation and require (#7177)
Expand Down Expand Up @@ -680,7 +680,7 @@ Changelog for v3.11.0
* bug: Fix MethodChainingIndentationFixer with arrow functions and class instantiation (#5587)
* bug: MethodChainingIndentationFixer - Fix bug with attribute access (#6573)
* bug: NoMultilineWhitespaceAroundDoubleArrowFixer - fix for single line comment (#6589)
* bug: TypeAlternationTransformer - TypeIntersectionTransforme - Bug: handle attributes (#6579)
* bug: TypeAlternationTransformer - TypeIntersectionTransformer - Bug: handle attributes (#6579)
* bug: [BinaryOperatorFixer] Fix more issues with scoped operators (#6559)
* docs: Remove `$` from console command snippets (#6600)
* docs: Remove `$` from console command snippets in documentation (#6599)
Expand Down Expand Up @@ -739,7 +739,7 @@ Changelog for v3.9.5
* DX: Narrow docblock types in Runner and Report (#6465)
* DX: Narrow docblock types in Tokenizer (#6293)
* minor: extract NoMultipleStatementsPerLineFixer from BracesFixer (#6458)
* minor: Let PhpdocLineSpan fixer detect docblocks when seperator from token with attribute (#6343)
* minor: Let PhpdocLineSpan fixer detect docblocks when separator from token with attribute (#6343)

Changelog for v3.9.4
--------------------
Expand Down Expand Up @@ -821,7 +821,7 @@ Changelog for v3.7.0

* bug #6112 [BinaryOperatorSpacesFixer] Fix align of `=` inside calls of methods (VincentLanglet)
* bug #6279 ClassReferenceNameCasingFixer - Fix for double arrow (SpacePossum)
* bug #6280 Fix bunch of enum issus (SpacePossum)
* bug #6280 Fix bunch of enum issues (SpacePossum)
* bug #6283 ClassReferenceNameCasingFixer - detect imports (SpacePossum)
* feature #5892 NewWithBracesFixer - option to remove braces (jrmajor)
* feature #6081 Allow multiline constructor arguments in an anonymous classes (jrmajor, SpacePossum)
Expand Down Expand Up @@ -851,7 +851,7 @@ Changelog for v3.6.0
* bug #6241 NoSuperfluousPhpdocTagsFixer - fix for reference and splat operator (kubawerlos)
* bug #6243 PhpdocTypesOrderFixer - fix for intersection types (kubawerlos)
* bug #6254 PhpUnitDedicateAssertFixer - remove `is_resource`. (drupol)
* bug #6264 TokensAnalyzer - fix isConstantInvocation detection for mulitple exce… (SpacePossum)
* bug #6264 TokensAnalyzer - fix isConstantInvocation detection for multiple exce… (SpacePossum)
* bug #6265 NullableTypeDeclarationForDefaultNullValueFixer - handle "readonly" a… (SpacePossum)
* bug #6266 SimplifiedIfReturnFixer - handle statement in loop without braces (SpacePossum)
* feature #6262 ClassReferenceNameCasingFixer - introduction (SpacePossum)
Expand Down Expand Up @@ -1511,7 +1511,7 @@ Changelog for v2.17.3
Changelog for v2.17.2
---------------------

* bug #5345 CleanNamespaceFixer - preserve traling comments (SpacePossum)
* bug #5345 CleanNamespaceFixer - preserve trailing comments (SpacePossum)
* bug #5348 PsrAutoloadingFixer - fix for class without namespace (kubawerlos)
* bug #5362 SingleSpaceAfterConstructFixer: Do not adjust whitespace before multiple multi-line extends (localheinz, SpacePossum)
* minor #5314 Enable testing with PHPUnit 9.x (sanmai)
Expand Down Expand Up @@ -2233,7 +2233,7 @@ Changelog for v2.15.4
* minor #4564 Move readme-update command to Section 3 (iwasherefirst2)
* minor #4566 Update symfony ruleset (gharlan)
* minor #4570 Command::execute() should always return an integer (derrabus)
* minor #4580 Add suport for true/false return type hints. (SpacePossum)
* minor #4580 Add support for true/false return type hints. (SpacePossum)
* minor #4584 Increase PHPStan level to 1 (julienfalque)
* minor #4585 Fix deprecation notices (julienfalque)
* minor #4587 Output details - Explain why a file was skipped (SpacePossum)
Expand Down Expand Up @@ -2394,8 +2394,8 @@ Changelog for v2.14.3
* minor #4340 Travis: build against 7.4snapshot instead of nightly (Slamdunk)
* minor #4351 code grooming (SpacePossum)
* minor #4353 Add more priority tests (SpacePossum)
* minor #4364 DX: MethodChainingIndentationFixer - remove unneccesary loop (Sijun Zhu)
* minor #4366 Unset the auxillary variable $a (GrahamCampbell)
* minor #4364 DX: MethodChainingIndentationFixer - remove unnecessary loop (Sijun Zhu)
* minor #4366 Unset the auxiliary variable $a (GrahamCampbell)
* minor #4368 Fixed TypeShortNameResolverTest::testResolver (GrahamCampbell)
* minor #4380 PHP7.4 - Add "str_split" => "mb_str_split" mapping. (SpacePossum)
* minor #4381 PHP7.4 - Add support for magic methods (un)serialize. (SpacePossum)
Expand Down Expand Up @@ -2569,7 +2569,7 @@ Changelog for v2.13.0
* feature #3812 Add FopenFlagOrderFixer & FopenFlagsFixer (SpacePossum)
* feature #3826 Add CombineNestedDirnameFixer (gharlan)
* feature #3833 BinaryOperatorSpacesFixer - Add "no space" fix strategy (SpacePossum)
* feature #3841 NoAliasFunctionsFixer - add opt in option for ext-mbstring aliasses (SpacePossum)
* feature #3841 NoAliasFunctionsFixer - add opt in option for ext-mbstring aliases (SpacePossum)
* feature #3876 NativeConstantInvocationFixer - add the scope option (stof, keradus)
* feature #3886 Add PhpUnitMethodCasingFixer (Slamdunk)
* feature #3907 Add ImplodeCallFixer (kubawerlos)
Expand Down Expand Up @@ -2650,8 +2650,8 @@ Changelog for v2.12.9
* minor #4340 Travis: build against 7.4snapshot instead of nightly (Slamdunk)
* minor #4351 code grooming (SpacePossum)
* minor #4353 Add more priority tests (SpacePossum)
* minor #4364 DX: MethodChainingIndentationFixer - remove unneccesary loop (Sijun Zhu)
* minor #4366 Unset the auxillary variable $a (GrahamCampbell)
* minor #4364 DX: MethodChainingIndentationFixer - remove unnecessary loop (Sijun Zhu)
* minor #4366 Unset the auxiliary variable $a (GrahamCampbell)
* minor #4368 Fixed TypeShortNameResolverTest::testResolver (GrahamCampbell)
* minor #4380 PHP7.4 - Add "str_split" => "mb_str_split" mapping. (SpacePossum)
* minor #4393 DX: add missing explicit return types (kubawerlos)
Expand Down Expand Up @@ -2906,7 +2906,7 @@ Changelog for v2.11.2
* bug #3673 PhpdocScalarFixer - Add "types" option (julienfalque, keradus)
* bug #3674 YodaStyleFixer - Fix variable detection for multidimensional arrays (julienfalque, SpacePossum)
* bug #3684 PhpUnitStrictFixer - Do not fix if not correct # of arguments are used (SpacePossum)
* bug #3708 EspaceImplicitBackslashesFixer - Fix escaping multiple backslashes (julienfalque)
* bug #3708 EscapeImplicitBackslashesFixer - Fix escaping multiple backslashes (julienfalque)
* bug #3715 SingleImportPerStatementFixer - Fix handling whitespace before opening brace (julienfalque)
* bug #3731 PhpdocIndentFixer - crash fix (SpacePossum)
* bug #3755 YodaStyleFixer - handle space between var name and index (SpacePossum)
Expand Down Expand Up @@ -3294,7 +3294,7 @@ Changelog for v2.7.2
* bug #3062 BraceClassInstantiationTransformer - Fix instantiation inside method call braces case (julienfalque, keradus)
* bug #3083 SingleBlankLineBeforeNamespaceFixer - Fix handling namespace right after opening tag (mlocati)
* bug #3109 SwitchCaseSemicolonToColonFixer - Fix bug with nested constructs (SpacePossum)
* bug #3117 Multibyte character in array key makes alignment incorect (kubawerlos)
* bug #3117 Multibyte character in array key makes alignment incorrect (kubawerlos)
* bug #3123 Cache - File permissions (SpacePossum)
* bug #3138 NoHomoglyphNamesFixer - fix crash on non-ascii but not mapped either (SpacePossum)
* bug #3172 IndentationTypeFixer - do not touch whitespace that is not indentation (SpacePossum)
Expand Down Expand Up @@ -3494,7 +3494,7 @@ Changelog for v2.3.3
* bug #2807 NoUselessElseFixer - Fix detection of conditional block (SpacePossum)
* bug #2809 Phar release - fix readme generation (SpacePossum, keradus)
* bug #2827 MethodArgumentSpaceFixer - Always remove trailing spaces (julienfalque)
* bug #2835 SelfAcessorFixer - class property fix (mnabialek)
* bug #2835 SelfAccessorFixer - class property fix (mnabialek)
* bug #2848 PhpdocIndentFixer - fix edge case with inline phpdoc (keradus)
* bug #2849 BracesFixer - Fix indentation issues with comments (julienfalque)
* bug #2851 Tokens - ensureWhitespaceAtIndex (GrahamCampbell, SpacePossum)
Expand Down Expand Up @@ -3882,7 +3882,7 @@ Changelog for v2.2.5
* bug #2807 NoUselessElseFixer - Fix detection of conditional block (SpacePossum)
* bug #2809 Phar release - fix readme generation (SpacePossum, keradus)
* bug #2827 MethodArgumentSpaceFixer - Always remove trailing spaces (julienfalque)
* bug #2835 SelfAcessorFixer - class property fix (mnabialek)
* bug #2835 SelfAccessorFixer - class property fix (mnabialek)
* bug #2848 PhpdocIndentFixer - fix edge case with inline phpdoc (keradus)
* bug #2849 BracesFixer - Fix indentation issues with comments (julienfalque)
* bug #2851 Tokens - ensureWhitespaceAtIndex (GrahamCampbell, SpacePossum)
Expand Down Expand Up @@ -4170,7 +4170,7 @@ Changelog for v2.0.1
* minor #2499 FileSpecificCodeSample - Specify class name relative to root namespace (localheinz, keradus)
* minor #2506 SCA (SpacePossum)
* minor #2515 Fix code indentation (keradus)
* minor #2521 SCA trailing spces check - ouput lines with trailing white space (SpacePossum)
* minor #2521 SCA trailing spces check - output lines with trailing white space (SpacePossum)
* minor #2522 Fix docs and small code issues (keradus)

Changelog for v2.0.0
Expand Down Expand Up @@ -4221,7 +4221,7 @@ Changelog for v2.0.0
* feature #1628 Added OrderedClassElementsFixer (gharlan)
* feature #1742 path argument is used to create an intersection with existing finder (keradus, gharlan)
* feature #1779 Added GeneralPhpdocAnnotationRemoveFixer, GeneralPhpdocAnnotationRenameFixer (keradus)
* feature #1811 Added NoSpacesInsideOfssetFixer (phansys)
* feature #1811 Added NoSpacesInsideOffsetFixer (phansys)
* feature #1819 Added DirConstantFixer, ModernizeTypesCastingFixer, RandomApiMigrationFixer (kalessil, SpacePossum, keradus)
* feature #1825 Added junit format (ekho)
* feature #1862 FixerFactory - Do not allow conflicting fixers (SpacePossum)
Expand Down Expand Up @@ -4338,7 +4338,7 @@ Changelog for v2.0.0
* minor #1846 FileFilterIterator - Corrected an iterator typehint (GrahamCampbell)
* minor #1848 DocBlock - Remove some old unused phpdoc tags (GrahamCampbell)
* minor #1856 NoDuplicateSemicolonsFixer - Remove overcomplete fixer (SpacePossum)
* minor #1861 Fix: Ofsset should be Offset (localheinz)
* minor #1861 Fix: Offset should be Offset (localheinz)
* minor #1867 Print non-report output to stdErr (SpacePossum, keradus)
* minor #1873 Enhancement: Show path to cache file if it exists (localheinz)
* minor #1875 renamed Composer package (fabpot)
Expand Down Expand Up @@ -4479,7 +4479,7 @@ Changelog for v1.12.3
* bug #2209 LinefeedFixer - Fix in a safe way (SpacePossum)
* bug #2228 NoEmptyLinesAfterPhpdocs, SingleBlankLineBeforeNamespace - Fix priority (SpacePossum)
* bug #2230 FunctionDeclarationFixer - Fix T_USE case (SpacePossum)
* bug #2232 Add a test for style of varaible decalration : var (daiglej)
* bug #2232 Add a test for style of variable declaration : var (daiglej)
* bug #2246 Fix itest requirements (keradus)
* minor #2238 .gitattributes - specified line endings (keradus)
* minor #2239 IntegrationCase - no longer internal (keradus)
Expand Down Expand Up @@ -4768,7 +4768,7 @@ Changelog for v1.10.1
* bug #1444 OrderedUseFixer - fix next case (keradus)
* bug #1441 BracesFixer - fix next case (keradus)
* bug #1422 AlignDoubleArrowFixer - fix handling of nested array (SpacePossum)
* bug #1425 PhpdocInlineTagFixerTest - fix case when met inalid PHPDoc (keradus)
* bug #1425 PhpdocInlineTagFixerTest - fix case when met invalid PHPDoc (keradus)
* bug #1419 AlignDoubleArrowFixer, AlignEqualsFixer - fix priorities (keradus)
* bug #1415 BlanklineAfterOpenTagFixer - Do not add a line break if there is one already. (SpacePossum)
* bug #1410 PhpdocIndentFixer - Fix for open tag (SpacePossum)
Expand Down Expand Up @@ -4916,7 +4916,7 @@ Changelog for v1.5.1
--------------------

* bug #1054 VisibilityFixer - fix var with array value assigned (localheinz, keradus)
* bug #1048 MultilineArrayTrailingCommaFixer, SingleArrayNoTrailingCommaFixer - using heredoc inside array not cousing to treat it as multiline array (keradus)
* bug #1048 MultilineArrayTrailingCommaFixer, SingleArrayNoTrailingCommaFixer - using heredoc inside array not causing to treat it as multiline array (keradus)
* bug #1043 PhpdocToCommentFixer - also check other control structures, besides foreach (ceeram)
* bug #1045 OrderedUseFixer - fix namespace order for trailing digits (rusitschka)
* bug #1035 PhpdocToCommentFixer - Add static as valid keyword for structural element (ceeram)
Expand Down Expand Up @@ -4950,7 +4950,7 @@ Changelog for v1.5
* minor #957 Fix Fixers methods order (GrahamCampbell)
* minor #944 Enable caching of composer downloads on Travis (stof)
* minor #941 EncodingFixer - enhance tests (keradus)
* minor #938 Psr0Fixer - remove unneded assignment (keradus)
* minor #938 Psr0Fixer - remove unneeded assignment (keradus)
* minor #936 FixerTest - test description consistency (keradus)
* minor #933 NoEmptyLinesAfterPhpdocsFixer - remove unneeded code, clarify description (ceeram)
* minor #934 StdinFileInfo::getFilename - Replace phpdoc with normal comment and add back empty line before return (ceeram)
Expand Down Expand Up @@ -4993,7 +4993,7 @@ Changelog for v1.4
* bug #945 Skip files containing __halt_compiler() on PHP 5.3 (stof)
* bug #946 BracesFixer - fix typo in exception name (keradus)
* bug #940 Tokens::setCode - apply missing transformation (keradus)
* bug #908 BracesFixer - fix invalide inserting brace for control structure without brace and lambda inside of it (keradus)
* bug #908 BracesFixer - fix invalid inserting brace for control structure without brace and lambda inside of it (keradus)
* bug #903 NoEmptyLinesAfterPhpdocsFixer - fix bug with Windows style lines (GrahamCampbell)
* bug #895 [PSR-2] Preserve blank line after control structure opening brace (marcaube)
* bug #892 Fixed the double arrow multiline whitespace fixer (GrahamCampbell)
Expand Down Expand Up @@ -5057,7 +5057,7 @@ Changelog for v1.2
* minor #779 Fixed a docblock type (GrahamCampbell)
* minor #765 Typehinting in FileCacheManager, remove unused variable in Tokens (keradus)
* minor #764 SelfUpdateCommand - get local version only if remote version was successfully obtained (keradus)
* minor #761 aling => (keradus)
* minor #761 align => (keradus)
* minor #757 Some minor code simplify and extra test (keradus)
* minor #713 Download php-cs-fixer.phar without sudo (michaelsauter)
* minor #742 Various Minor Improvements (GrahamCampbell)
Expand Down
14 changes: 7 additions & 7 deletions src/Fixer/Operator/NoUselessConcatOperatorFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ private function fixConcatOperation(Tokens $tokens, array $firstOperand, int $co
(self::STR_DOUBLE_QUOTE === $firstOperand['type'] && self::STR_DOUBLE_QUOTE === $secondOperand['type'])
|| (self::STR_SINGLE_QUOTE === $firstOperand['type'] && self::STR_SINGLE_QUOTE === $secondOperand['type'])
) {
$this->mergeContantEscapedStringOperands($tokens, $firstOperand, $concatIndex, $secondOperand);
$this->mergeConstantEscapedStringOperands($tokens, $firstOperand, $concatIndex, $secondOperand);

return;
}

if (self::STR_DOUBLE_QUOTE_VAR === $firstOperand['type'] && self::STR_DOUBLE_QUOTE_VAR === $secondOperand['type']) {
$this->mergeContantEscapedStringVarOperands($tokens, $firstOperand, $concatIndex, $secondOperand);
$this->mergeConstantEscapedStringVarOperands($tokens, $firstOperand, $concatIndex, $secondOperand);

return;
}
Expand All @@ -146,7 +146,7 @@ private function fixConcatOperation(Tokens $tokens, array $firstOperand, int $co
[$operand1, $operand2] = $operandPair;

if (self::STR_DOUBLE_QUOTE_VAR === $operand1['type'] && self::STR_DOUBLE_QUOTE === $operand2['type']) {
$this->mergeContantEscapedStringVarOperands($tokens, $firstOperand, $concatIndex, $secondOperand);
$this->mergeConstantEscapedStringVarOperands($tokens, $firstOperand, $concatIndex, $secondOperand);

return;
}
Expand All @@ -159,7 +159,7 @@ private function fixConcatOperation(Tokens $tokens, array $firstOperand, int $co
$operantContent = $tokens[$operand2['start']]->getContent();

if ($this->isSimpleQuotedStringContent($operantContent)) {
$this->mergeContantEscapedStringOperands($tokens, $firstOperand, $concatIndex, $secondOperand);
$this->mergeConstantEscapedStringOperands($tokens, $firstOperand, $concatIndex, $secondOperand);
}

return;
Expand All @@ -169,7 +169,7 @@ private function fixConcatOperation(Tokens $tokens, array $firstOperand, int $co
$operantContent = $tokens[$operand2['start']]->getContent();

if ($this->isSimpleQuotedStringContent($operantContent)) {
$this->mergeContantEscapedStringVarOperands($tokens, $firstOperand, $concatIndex, $secondOperand);
$this->mergeConstantEscapedStringVarOperands($tokens, $firstOperand, $concatIndex, $secondOperand);
}

return;
Expand Down Expand Up @@ -227,7 +227,7 @@ private function getConcatOperandType(Tokens $tokens, int $index, int $direction
* type: self::STR_*,
* } $secondOperand
*/
private function mergeContantEscapedStringOperands(
private function mergeConstantEscapedStringOperands(
Tokens $tokens,
array $firstOperand,
int $concatOperatorIndex,
Expand Down Expand Up @@ -260,7 +260,7 @@ private function mergeContantEscapedStringOperands(
* type: self::STR_*,
* } $secondOperand
*/
private function mergeContantEscapedStringVarOperands(
private function mergeConstantEscapedStringVarOperands(
Tokens $tokens,
array $firstOperand,
int $concatOperatorIndex,
Expand Down
2 changes: 1 addition & 1 deletion src/Indicator/PhpUnitTestCaseIndicator.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function isPhpUnitClass(Tokens $tokens, int $index): bool
* Returns an indices of PHPUnit classes in reverse appearance order.
* Order is important - it's reverted, so if we inject tokens into collection,
* we do it for bottom of file first, and then to the top of the file, so we
* mitigate risk of not visiting whole collcetion (final indices).
* mitigate risk of not visiting whole collections (final indices).
*
* @return iterable<array{0: int, 1: int}> array of [int start, int end] indices from later to earlier classes
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/Fixer/Basic/SingleLineEmptyBodyFixerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function f4()
'<?php
class Foo {}
class Bar extends BarParent {}
class Baz implements BazInteface {}
class Baz implements BazInterface {}
abstract class A {}
final class F {}
',
Expand All @@ -74,7 +74,7 @@ class Foo
}
class Bar extends BarParent
{}
class Baz implements BazInteface {}
class Baz implements BazInterface {}
abstract class A
{}
final class F
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixer/Casing/NativeFunctionCasingFixerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static function provideFixCases(): iterable
'<?php
namespace Bar {
function STRLEN($str) {
return "overriden" . \strlen($str);
return "overridden" . \strlen($str);
}
}
Expand Down

0 comments on commit 9901473

Please sign in to comment.