From ede92bdc570b4b593370191e3236d25292c12b1c Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 27 Nov 2025 19:53:00 +0700 Subject: [PATCH 1/4] [c] Add typos workflow --- .github/typos.toml | 9 +++++++++ .github/workflows/typos.yaml | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/typos.toml create mode 100644 .github/workflows/typos.yaml diff --git a/.github/typos.toml b/.github/typos.toml new file mode 100644 index 00000000..d35e28d3 --- /dev/null +++ b/.github/typos.toml @@ -0,0 +1,9 @@ +[default.extend-words] +Symplify = "Symplify" + +# doctrine behavior +Deleteable = "Deleteable" + +# fixing typo in code +"Fullfilled" = "Fullfilled" + diff --git a/.github/workflows/typos.yaml b/.github/workflows/typos.yaml new file mode 100644 index 00000000..f06e4f15 --- /dev/null +++ b/.github/workflows/typos.yaml @@ -0,0 +1,24 @@ +# see https://github.com/crate-ci/typos +name: "Typos" + +on: + pull_request: + push: + branches: + - "main" + +jobs: + typos: + name: "Check for typos" + runs-on: "ubuntu-latest" + + steps: + - uses: actions/checkout@v4 + + + + - name: "Check for typos" + uses: "crate-ci/typos@v1.40.0" + with: + config: .github/typos.toml + files: "README.md src config rules tests rules-tests" From c1fe465f1c19f26214bbb4f70999acb72950e7c9 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 27 Nov 2025 19:56:56 +0700 Subject: [PATCH 2/4] fix typoes --- .github/typos.toml | 9 ++-- .../Fixture/variable_assigned.php.inc | 4 +- ...h_several_named_and_not_named_args.php.inc | 4 +- ...keep_with_mulitiple_function_calls.php.inc | 45 ------------------- .../Class_/AddCoversClassAttributeRector.php | 2 +- 5 files changed, 9 insertions(+), 55 deletions(-) delete mode 100644 rules-tests/PHPUnit60/Rector/ClassMethod/AddDoesNotPerformAssertionToNonAssertingTestRector/Fixture/keep_with_mulitiple_function_calls.php.inc diff --git a/.github/typos.toml b/.github/typos.toml index d35e28d3..d36f45fc 100644 --- a/.github/typos.toml +++ b/.github/typos.toml @@ -1,9 +1,8 @@ [default.extend-words] Symplify = "Symplify" -# doctrine behavior -Deleteable = "Deleteable" - -# fixing typo in code -"Fullfilled" = "Fullfilled" +# collection of Boolean nodes +BooleanAnds = "BooleanAnds" +# regex purpose +SomREGEPX = "SomREGEPX" diff --git a/rules-tests/CodeQuality/Rector/Class_/AddReturnTypeToDependedRector/Fixture/variable_assigned.php.inc b/rules-tests/CodeQuality/Rector/Class_/AddReturnTypeToDependedRector/Fixture/variable_assigned.php.inc index 87bd2a68..54117804 100644 --- a/rules-tests/CodeQuality/Rector/Class_/AddReturnTypeToDependedRector/Fixture/variable_assigned.php.inc +++ b/rules-tests/CodeQuality/Rector/Class_/AddReturnTypeToDependedRector/Fixture/variable_assigned.php.inc @@ -4,7 +4,7 @@ namespace Rector\PHPUnit\Tests\CodeQuality\Rector\Class_\AddReturnTypeToDepended use PHPUnit\Framework\TestCase; -final class VaribleAssigned extends TestCase +final class VariableAssigned extends TestCase { public function test() { @@ -22,7 +22,7 @@ namespace Rector\PHPUnit\Tests\CodeQuality\Rector\Class_\AddReturnTypeToDepended use PHPUnit\Framework\TestCase; -final class VaribleAssigned extends TestCase +final class VariableAssigned extends TestCase { public function test(): int { diff --git a/rules-tests/PHPUnit100/Rector/Class_/RemoveNamedArgsInDataProviderRector/Fixture/provide_data_with_several_named_and_not_named_args.php.inc b/rules-tests/PHPUnit100/Rector/Class_/RemoveNamedArgsInDataProviderRector/Fixture/provide_data_with_several_named_and_not_named_args.php.inc index 224fb178..7a8fb037 100644 --- a/rules-tests/PHPUnit100/Rector/Class_/RemoveNamedArgsInDataProviderRector/Fixture/provide_data_with_several_named_and_not_named_args.php.inc +++ b/rules-tests/PHPUnit100/Rector/Class_/RemoveNamedArgsInDataProviderRector/Fixture/provide_data_with_several_named_and_not_named_args.php.inc @@ -18,7 +18,7 @@ final class ProvideDataWithSeveralNamedAndNotNamedArgs extends TestCase yield [ 'namedArg' => 100, null, - fn() => 'G-EAZY', + fn() => 'G-EASY', 'Key' => fn() => 'Post Malone', 'another' => 'arg1', new \Exception(), @@ -50,7 +50,7 @@ final class ProvideDataWithSeveralNamedAndNotNamedArgs extends TestCase yield [ 100, null, - fn() => 'G-EAZY', + fn() => 'G-EASY', fn() => 'Post Malone', 'arg1', new \Exception(), diff --git a/rules-tests/PHPUnit60/Rector/ClassMethod/AddDoesNotPerformAssertionToNonAssertingTestRector/Fixture/keep_with_mulitiple_function_calls.php.inc b/rules-tests/PHPUnit60/Rector/ClassMethod/AddDoesNotPerformAssertionToNonAssertingTestRector/Fixture/keep_with_mulitiple_function_calls.php.inc deleted file mode 100644 index d97b5813..00000000 --- a/rules-tests/PHPUnit60/Rector/ClassMethod/AddDoesNotPerformAssertionToNonAssertingTestRector/Fixture/keep_with_mulitiple_function_calls.php.inc +++ /dev/null @@ -1,45 +0,0 @@ -refreshFixtures(); - $this->doSomeOtherStuff(); - - $this->handleAssert($bool); - } - - /** - * @return bool[] - */ - public function trueProvider(): array - { - return [ - [true], - ]; - } - - private function handleAssert(bool $bool): void - { - // some generic function that can be used for multiple test to do the same assertions. - self::assertTrue($bool); - } - - protected function refreshFixtures(): void - { - // TODO: Implement refreshFixtures() method. - } - - protected function doSomeOtherStuff(): void - { - // TODO: Implement doSomeOtherStuff() method. - } -} diff --git a/rules/CodeQuality/Rector/Class_/AddCoversClassAttributeRector.php b/rules/CodeQuality/Rector/Class_/AddCoversClassAttributeRector.php index 61a9d17a..714a6ff2 100644 --- a/rules/CodeQuality/Rector/Class_/AddCoversClassAttributeRector.php +++ b/rules/CodeQuality/Rector/Class_/AddCoversClassAttributeRector.php @@ -15,7 +15,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** - * @deprecated as very specific and assumes test + class colocation. Better use custom rule isntead. + * @deprecated as very specific and assumes test + class colocation. Better use custom rule instead. */ final class AddCoversClassAttributeRector extends AbstractRector implements ConfigurableRectorInterface, DeprecatedInterface { From 7bd0f798989c18834e702855fb44c9cab515b434 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 27 Nov 2025 19:57:00 +0700 Subject: [PATCH 3/4] fix typoes --- .../keep_with_multiple_function_calls.php.inc | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 rules-tests/PHPUnit60/Rector/ClassMethod/AddDoesNotPerformAssertionToNonAssertingTestRector/Fixture/keep_with_multiple_function_calls.php.inc diff --git a/rules-tests/PHPUnit60/Rector/ClassMethod/AddDoesNotPerformAssertionToNonAssertingTestRector/Fixture/keep_with_multiple_function_calls.php.inc b/rules-tests/PHPUnit60/Rector/ClassMethod/AddDoesNotPerformAssertionToNonAssertingTestRector/Fixture/keep_with_multiple_function_calls.php.inc new file mode 100644 index 00000000..d97b5813 --- /dev/null +++ b/rules-tests/PHPUnit60/Rector/ClassMethod/AddDoesNotPerformAssertionToNonAssertingTestRector/Fixture/keep_with_multiple_function_calls.php.inc @@ -0,0 +1,45 @@ +refreshFixtures(); + $this->doSomeOtherStuff(); + + $this->handleAssert($bool); + } + + /** + * @return bool[] + */ + public function trueProvider(): array + { + return [ + [true], + ]; + } + + private function handleAssert(bool $bool): void + { + // some generic function that can be used for multiple test to do the same assertions. + self::assertTrue($bool); + } + + protected function refreshFixtures(): void + { + // TODO: Implement refreshFixtures() method. + } + + protected function doSomeOtherStuff(): void + { + // TODO: Implement doSomeOtherStuff() method. + } +} From b4e01e0960b179d976d6756de43a4fb72ccf5c7c Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 27 Nov 2025 19:58:36 +0700 Subject: [PATCH 4/4] fix typoes --- .github/typos.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/typos.toml b/.github/typos.toml index d36f45fc..0c7ad496 100644 --- a/.github/typos.toml +++ b/.github/typos.toml @@ -2,7 +2,7 @@ Symplify = "Symplify" # collection of Boolean nodes -BooleanAnds = "BooleanAnds" +Ands = "Ands" # regex purpose -SomREGEPX = "SomREGEPX" +Som = "Som"