aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/App/AppStore
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/App/AppStore')
-rw-r--r--lib/private/App/AppStore/Fetcher/AppFetcher.php2
-rw-r--r--lib/private/App/AppStore/Version/VersionParser.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/App/AppStore/Fetcher/AppFetcher.php b/lib/private/App/AppStore/Fetcher/AppFetcher.php
index 35bec10f5ae..47bdece372d 100644
--- a/lib/private/App/AppStore/Fetcher/AppFetcher.php
+++ b/lib/private/App/AppStore/Fetcher/AppFetcher.php
@@ -99,7 +99,7 @@ class AppFetcher extends Fetcher {
foreach ($app['releases'] as $release) {
// Exclude all nightly and pre-releases if required
if (($allowNightly || $release['isNightly'] === false)
- && ($allowPreReleases || strpos($release['version'], '-') === false)) {
+ && ($allowPreReleases || !str_contains($release['version'], '-'))) {
// Exclude all versions not compatible with the current version
try {
$versionParser = new VersionParser();
diff --git a/lib/private/App/AppStore/Version/VersionParser.php b/lib/private/App/AppStore/Version/VersionParser.php
index 6a369b1cb6e..2b88399b9fd 100644
--- a/lib/private/App/AppStore/Version/VersionParser.php
+++ b/lib/private/App/AppStore/Version/VersionParser.php
@@ -64,7 +64,7 @@ class VersionParser {
if (!$this->isValidVersionString($firstVersionNumber)) {
break;
}
- if (strpos($firstVersion, '>') === 0) {
+ if (str_starts_with($firstVersion, '>')) {
return new Version($firstVersionNumber, '');
}
return new Version('', $firstVersionNumber);