Skip to content

Commit

Permalink
Fix: Slide method
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Feb 24, 2023
1 parent b9e3734 commit 4fcb0e6
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions src/Vendor/Composer/VersionConstraintNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,32 +111,6 @@ private static function normalizeVersionConstraintSeparators(string $versionCons
);
}

/**
* @see https://github.com/composer/semver/blob/3.3.2/src/VersionParser.php#L257
*
* @return array<int, string>
*/
private static function splitIntoOrConstraints(string $versionConstraint): array
{
return \preg_split(
'{\s*\|\|?\s*}',
$versionConstraint,
);
}

/**
* @see https://github.com/composer/semver/blob/3.3.2/src/VersionParser.php#L264
*
* @return array<int, string>
*/
private static function splitIntoAndConstraints(string $orConstraint): array
{
return \preg_split(
'{(?<!^|as|[=>< ,]) *(?<!-)[, ](?!-) *(?!,|as|$)}',
$orConstraint,
);
}

private static function sortOrConstraints(string $versionConstraint): string
{
$normalize = static function (string $versionConstraint): string {
Expand Down Expand Up @@ -164,4 +138,30 @@ private static function sortOrConstraints(string $versionConstraint): string

return \implode(' || ', $orConstraints);
}

/**
* @see https://github.com/composer/semver/blob/3.3.2/src/VersionParser.php#L257
*
* @return array<int, string>
*/
private static function splitIntoOrConstraints(string $versionConstraint): array
{
return \preg_split(
'{\s*\|\|?\s*}',
$versionConstraint,
);
}

/**
* @see https://github.com/composer/semver/blob/3.3.2/src/VersionParser.php#L264
*
* @return array<int, string>
*/
private static function splitIntoAndConstraints(string $orConstraint): array
{
return \preg_split(
'{(?<!^|as|[=>< ,]) *(?<!-)[, ](?!-) *(?!,|as|$)}',
$orConstraint,
);
}
}

0 comments on commit 4fcb0e6

Please sign in to comment.