Skip to content

Commit dd62a5e

Browse files
authored
[ci] Add typos workflow (#345)
* [ci] Add typos workflow * fix typo * fix typo
1 parent c03373a commit dd62a5e

File tree

9 files changed

+39
-11
lines changed

9 files changed

+39
-11
lines changed

.github/typos.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[default.extend-words]
2+
Symplify = "Symplify"
3+
4+
Invokable = "Invokable"

.github/workflows/typos.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# see https://github.com/crate-ci/typos
2+
name: "Typos"
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches:
8+
- "main"
9+
10+
jobs:
11+
typos:
12+
name: "Check for typos"
13+
runs-on: "ubuntu-latest"
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
19+
20+
- name: "Check for typos"
21+
uses: "crate-ci/[email protected]"
22+
with:
23+
config: .github/typos.toml
24+
files: "README.md src config rules tests rules-tests"

rules-tests/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector/Fixture/class_contant.php.inc renamed to rules-tests/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector/Fixture/class_constant.php.inc

File renamed without changes.

rules-tests/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector/Fixture/in_stirng_variable.php.inc renamed to rules-tests/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector/Fixture/in_string_variable.php.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Rector\Tests\DowngradePhp73\Rector\FuncCall\DowngradeTrailingCommasInFunctionCallsRector\Fixture;
44

5-
class InStirngVariable
5+
class InStringVariable
66
{
77
public function run()
88
{
@@ -16,7 +16,7 @@ class InStirngVariable
1616

1717
namespace Rector\Tests\DowngradePhp73\Rector\FuncCall\DowngradeTrailingCommasInFunctionCallsRector\Fixture;
1818

19-
class InStirngVariable
19+
class InStringVariable
2020
{
2121
public function run()
2222
{

rules-tests/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector/Fixture/iterable.php.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
namespace Rector\Tests\DowngradePhp74\Rector\ClassMethod\DowngradeCovariantReturnTypeRector\Fixture;
44

5-
class InterableA
5+
class IterableA
66
{
77
public function covariantReturnTypes(): iterable
88
{ /* … */ }
99
}
1010

11-
class InterableB extends InterableA
11+
class IterableB extends IterableA
1212
{
1313
public function covariantReturnTypes(): array
1414
{ /* … */ }
@@ -20,13 +20,13 @@ class InterableB extends InterableA
2020

2121
namespace Rector\Tests\DowngradePhp74\Rector\ClassMethod\DowngradeCovariantReturnTypeRector\Fixture;
2222

23-
class InterableA
23+
class IterableA
2424
{
2525
public function covariantReturnTypes(): iterable
2626
{ /* … */ }
2727
}
2828

29-
class InterableB extends InterableA
29+
class IterableB extends IterableA
3030
{
3131
/**
3232
* @return mixed[]

rules-tests/DowngradePhp80/Rector/FuncCall/DowngradeSubstrFalsyRector/Fixture/skip_zero_offset_with_positive_length.php.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Rector\Tests\DowngradePhp80\Rector\FuncCall\DowngradeSubstrFalsyRector\Fixture;
44

55
/**
6-
* zero offset with postive length can't be false
6+
* zero offset with positive length can't be false
77
*/
88
class SkipZeroOffsetWithPositiveLength
99
{

rules/DowngradePhp72/NodeAnalyzer/OverrideFromAnonymousClassMethodAnalyzer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(
2525
) {
2626
}
2727

28-
public function matchAncestorClassReflectionOverrideable(
28+
public function matchAncestorClassReflectionOverridable(
2929
ClassLike $classLike,
3030
ClassMethod $classMethod
3131
): ?ClassReflection {

rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function refactor(Node $node): ?Node
101101
$hasChanged = false;
102102

103103
foreach ($node->getMethods() as $method) {
104-
$ancestorOverridableAnonymousClass = $this->overrideFromAnonymousClassMethodAnalyzer->matchAncestorClassReflectionOverrideable(
104+
$ancestorOverridableAnonymousClass = $this->overrideFromAnonymousClassMethodAnalyzer->matchAncestorClassReflectionOverridable(
105105
$node,
106106
$method
107107
);

rules/DowngradePhp81/NodeFactory/ArrayMergeFromArraySpreadFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(
2828

2929
public function createFromArray(Array_ $array, MutatingScope $mutatingScope): FuncCall
3030
{
31-
$newArrayItems = $this->disolveArrayItems($array);
31+
$newArrayItems = $this->dissolveArrayItems($array);
3232
return $this->createArrayMergeFuncCall($newArrayItems, $mutatingScope);
3333
}
3434

@@ -40,7 +40,7 @@ public function createFromArray(Array_ $array, MutatingScope $mutatingScope): Fu
4040
* to be added once the next spread is found, or at the end
4141
* @return ArrayItem[]
4242
*/
43-
private function disolveArrayItems(Array_ $array): array
43+
private function dissolveArrayItems(Array_ $array): array
4444
{
4545
$newItems = [];
4646

0 commit comments

Comments
 (0)