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" diff --git a/rules-tests/CodeQuality/Rector/Class_/MoveCurrentDateTimeDefaultInEntityToConstructorRector/Fixture/already_consturctor.php.inc b/rules-tests/CodeQuality/Rector/Class_/MoveCurrentDateTimeDefaultInEntityToConstructorRector/Fixture/already_constructor.php.inc similarity index 100% rename from rules-tests/CodeQuality/Rector/Class_/MoveCurrentDateTimeDefaultInEntityToConstructorRector/Fixture/already_consturctor.php.inc rename to rules-tests/CodeQuality/Rector/Class_/MoveCurrentDateTimeDefaultInEntityToConstructorRector/Fixture/already_constructor.php.inc diff --git a/rules-tests/CodeQuality/Rector/Class_/YamlToAttributeDoctrineMappingRector/config/yaml_mapping/embdded_mapping.yml b/rules-tests/CodeQuality/Rector/Class_/YamlToAttributeDoctrineMappingRector/config/yaml_mapping/embedded_mapping.yml similarity index 100% rename from rules-tests/CodeQuality/Rector/Class_/YamlToAttributeDoctrineMappingRector/config/yaml_mapping/embdded_mapping.yml rename to rules-tests/CodeQuality/Rector/Class_/YamlToAttributeDoctrineMappingRector/config/yaml_mapping/embedded_mapping.yml diff --git a/rules-tests/CodeQuality/Rector/Class_/YamlToAttributeDoctrineMappingRector/config/yaml_mapping/embdded_mapping_prefix_false.yml b/rules-tests/CodeQuality/Rector/Class_/YamlToAttributeDoctrineMappingRector/config/yaml_mapping/embedded_mapping_prefix_false.yml similarity index 100% rename from rules-tests/CodeQuality/Rector/Class_/YamlToAttributeDoctrineMappingRector/config/yaml_mapping/embdded_mapping_prefix_false.yml rename to rules-tests/CodeQuality/Rector/Class_/YamlToAttributeDoctrineMappingRector/config/yaml_mapping/embedded_mapping_prefix_false.yml diff --git a/rules-tests/CodeQuality/Rector/Property/TypedPropertyFromToOneRelationTypeRector/Fixture/do_no_preprend_slash.php.inc b/rules-tests/CodeQuality/Rector/Property/TypedPropertyFromToOneRelationTypeRector/Fixture/do_no_prepend_slash.php.inc similarity index 100% rename from rules-tests/CodeQuality/Rector/Property/TypedPropertyFromToOneRelationTypeRector/Fixture/do_no_preprend_slash.php.inc rename to rules-tests/CodeQuality/Rector/Property/TypedPropertyFromToOneRelationTypeRector/Fixture/do_no_prepend_slash.php.inc diff --git a/rules-tests/Dbal40/Rector/StmtsAwareInterface/ExecuteQueryParamsToBindValueRector/Fixture/some_file_with_execture.php.inc b/rules-tests/Dbal40/Rector/StmtsAwareInterface/ExecuteQueryParamsToBindValueRector/Fixture/some_file_with_execute.php.inc similarity index 100% rename from rules-tests/Dbal40/Rector/StmtsAwareInterface/ExecuteQueryParamsToBindValueRector/Fixture/some_file_with_execture.php.inc rename to rules-tests/Dbal40/Rector/StmtsAwareInterface/ExecuteQueryParamsToBindValueRector/Fixture/some_file_with_execute.php.inc diff --git a/rules-tests/Orm28/Rector/MethodCall/IterateToToIterableRector/Fixture/skip_already_using_correct_function.php.inc b/rules-tests/Orm28/Rector/MethodCall/IterateToToIterableRector/Fixture/skip_already_using_correct_function.php.inc index 0f3c3f7e..68c31167 100644 --- a/rules-tests/Orm28/Rector/MethodCall/IterateToToIterableRector/Fixture/skip_already_using_correct_function.php.inc +++ b/rules-tests/Orm28/Rector/MethodCall/IterateToToIterableRector/Fixture/skip_already_using_correct_function.php.inc @@ -6,8 +6,6 @@ class SkipAlreadyUsingCorrectFunction { public function getResults(): iterable { - return $this->getEnityManager()->select('e')->from('entity')->getQuery()->toIterable(); + return $this->getEntityManager()->select('e')->from('entity')->getQuery()->toIterable(); } } - -?> diff --git a/rules-tests/TypedCollections/Rector/MethodCall/AssertSameCountOnCollectionToAssertCountRector/Fixture/skip_assert_count_on_somethign_else.php.inc b/rules-tests/TypedCollections/Rector/MethodCall/AssertSameCountOnCollectionToAssertCountRector/Fixture/skip_assert_count_on_something_else.php.inc similarity index 100% rename from rules-tests/TypedCollections/Rector/MethodCall/AssertSameCountOnCollectionToAssertCountRector/Fixture/skip_assert_count_on_somethign_else.php.inc rename to rules-tests/TypedCollections/Rector/MethodCall/AssertSameCountOnCollectionToAssertCountRector/Fixture/skip_assert_count_on_something_else.php.inc diff --git a/rules/DoctrineFixture/Rector/MethodCall/AddGetReferenceTypeRector.php b/rules/DoctrineFixture/Rector/MethodCall/AddGetReferenceTypeRector.php index 2dc05de4..b9972ab9 100644 --- a/rules/DoctrineFixture/Rector/MethodCall/AddGetReferenceTypeRector.php +++ b/rules/DoctrineFixture/Rector/MethodCall/AddGetReferenceTypeRector.php @@ -104,13 +104,13 @@ public function refactor(Node $node): MethodCall|null return null; } - $callerParameterObjetType = $this->parameterTypeResolver->resolveCallerFirstParameterObjectType($node); - if (! $callerParameterObjetType instanceof ObjectType) { + $callerParameterObjectType = $this->parameterTypeResolver->resolveCallerFirstParameterObjectType($node); + if (! $callerParameterObjectType instanceof ObjectType) { return null; } $nestedMethodCall->args[] = new Arg(new ClassConstFetch(new FullyQualified( - $callerParameterObjetType->getClassName() + $callerParameterObjectType->getClassName() ), 'class')); return $node; }