Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ final class SimplifyRegexPatternRector extends AbstractRector
* @var array<string, string>
*/
private const COMPLEX_PATTERN_TO_SIMPLE = [
'[0-9]' => '\\\d',
'[a-zA-Z0-9_]' => '\\\w',
'[A-Za-z0-9_]' => '\\\w',
'[0-9a-zA-Z_]' => '\\\w',
'[0-9A-Za-z_]' => '\\\w',
'[\r\n\t\f\v ]' => '\\\s',
'[0-9]' => "\d",
'[a-zA-Z0-9_]' => "\w",
'[A-Za-z0-9_]' => "\w",
'[0-9a-zA-Z_]' => "\w",
'[0-9A-Za-z_]' => "\w",
'[\r\n\t\f\v ]' => "\s",
];

public function __construct(
Expand Down