Skip to content

Commit e0e96bd

Browse files
committed
Rename branch, fix preg_quote bug
1 parent 29e5af7 commit e0e96bd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.scripts/setup.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ public function __construct() {
147147

148148
$this->delete( "{$path}/.git" );
149149
exec( 'git init' );
150+
exec( 'git branch -m main' );
150151

151152
echo 'Setting up Composer...' . PHP_EOL . PHP_EOL;
152153

@@ -339,9 +340,7 @@ public function isPublic() {
339340
* @return string
340341
*/
341342
public function toAlphaNumeric( $string, $extraChars = '-_' ) {
342-
$pattern = preg_quote( '/[^a-zA-Z0-9' . $extraChars . ']/', '/' );
343-
344-
return preg_replace( $pattern, '', $string );
343+
return preg_replace( '/[^a-zA-Z0-9' . $extraChars . ']/', '', $string );
345344

346345
}
347346

0 commit comments

Comments
 (0)