style updates

This commit is contained in:
Mark Gregory
2026-07-24 14:59:44 +01:00
parent 24ab771cd3
commit dd23205d0b
482 changed files with 7173 additions and 1435 deletions
@@ -1,17 +1,30 @@
<?php
namespace Modules\Marketplace\Services;
use Illuminate\Support\Facades\App;
final class CompatibilityChecker
{
public function __construct(private VersionConstraint $constraints=new VersionConstraint()) {}
public function __construct(private VersionConstraint $constraints = new VersionConstraint) {}
public function check(array $manifest): array
{
$errors=[];
$php=(string)($manifest['php'] ?? '*'); $laravel=(string)($manifest['laravel'] ?? '*');
$platform=(string)($manifest['content_manager'] ?? '*'); $platformVersion=(string) config('app.version','1.0.0');
if (!$this->constraints->matches(PHP_VERSION,$php)) $errors[]="Requires PHP $php; running ".PHP_VERSION.'.';
if (!$this->constraints->matches(App::version(),$laravel)) $errors[]="Requires Laravel $laravel; running ".App::version().'.';
if (!$this->constraints->matches($platformVersion,$platform)) $errors[]="Requires Content Manager $platform; running $platformVersion.";
return ['compatible'=>$errors===[],'errors'=>$errors];
$errors = [];
$php = (string) ($manifest['php'] ?? '*');
$laravel = (string) ($manifest['laravel'] ?? '*');
$platform = (string) ($manifest['content_manager'] ?? '*');
$platformVersion = (string) config('app.version', '1.0.0');
if (! $this->constraints->matches(PHP_VERSION, $php)) {
$errors[] = "Requires PHP $php; running ".PHP_VERSION.'.';
}
if (! $this->constraints->matches(App::version(), $laravel)) {
$errors[] = "Requires Laravel $laravel; running ".App::version().'.';
}
if (! $this->constraints->matches($platformVersion, $platform)) {
$errors[] = "Requires Content Manager $platform; running $platformVersion.";
}
return ['compatible' => $errors === [], 'errors' => $errors];
}
}