Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  Add new violations to typo rule (#1544)
  composer(deps-dev): bump symfony/var-dumper from 6.3.5 to 6.3.6 (#1545)
  • Loading branch information
OskarStark committed Oct 23, 2023
2 parents 7ae4ac7 + 8f57a34 commit 5338fd2
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 7 deletions.
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,11 @@ Pattern | Message
`/overriden/i` | Typo in word "%s"
`/succesfully/i` | Typo in word "%s"
`/optionnally/i` | Typo in word "%s"
`/esimated/i` | Typo in word "%s"
`/strengh/i` | Typo in word "%s"
`/mehtod/i` | Typo in word "%s"
`/contraint/i` | Typo in word "%s"
`/instanciation/i` | Typo in word "%s", use "instantiation"

## `unused_links`

Expand Down
5 changes: 5 additions & 0 deletions src/Rule/Typo.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ public static function getList(): array
'/overriden/i' => null,
'/succesfully/i' => null,
'/optionnally/i' => null,
'/esimated/i' => null,
'/strengh/i' => null,
'/mehtod/i' => null,
'/contraint/i' => null,
'/instanciation/i' => 'Typo in word "%s", use "instantiation"',
];
}
}
20 changes: 20 additions & 0 deletions tests/Rule/TypoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ public static function validProvider(): iterable
'successfully',
'Optionally',
'optionally',
'Estimated',
'estimated',
'Strength',
'strength',
'Method',
'method',
'Constraint',
'constraint',
'Instantiation',
'instantiation',
];

foreach ($valids as $valid) {
Expand Down Expand Up @@ -124,6 +134,16 @@ public static function invalidProvider(): iterable
'succesfully',
'Optionnally',
'optionnally',
'Esimated',
'esimated',
'Strengh',
'strengh',
'Mehtod',
'mehtod',
'Contraint',
'contraint',
'Instanciation',
'instanciation',
];

foreach ($invalids as $invalid) {
Expand Down

0 comments on commit 5338fd2

Please sign in to comment.