Apply rector rules: symfony up to 54

This commit is contained in:
2024-04-04 23:30:25 +02:00
parent 1ee3b9e2f0
commit 579bd829f8
204 changed files with 974 additions and 2346 deletions

View File

@@ -21,6 +21,7 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
class ConfigureOpenstackObjectStorageCommand extends Command
{
protected static $defaultDescription = 'Configure openstack container to store documents';
private readonly string $basePath;
private readonly string $tempUrlKey;
@@ -37,7 +38,7 @@ class ConfigureOpenstackObjectStorageCommand extends Command
protected function configure()
{
$this->setDescription('Configure openstack container to store documents')
$this
->setName('chill:doc-store:configure-openstack')
->addOption('os_token', 'o', InputOption::VALUE_REQUIRED, 'Openstack token')
->addOption('domain', 'd', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Domain name')
@@ -85,6 +86,6 @@ class ConfigureOpenstackObjectStorageCommand extends Command
}
}
return 0;
return Command::SUCCESS;
}
}

View File

@@ -16,21 +16,14 @@ use Symfony\Component\Serializer\Annotation as Serializer;
readonly class SignedUrl
{
public function __construct(
/**
* @Serializer\Groups({"read"})
*/
#[Serializer\Groups(['read'])]
public string $method,
/**
* @Serializer\Groups({"read"})
*/
#[Serializer\Groups(['read'])]
public string $url,
public \DateTimeImmutable $expires,
) {}
/**
* @Serializer\Groups({"read"})
*/
#[Serializer\Groups(['read'])]
public function getExpires(): int
{
return $this->expires->getTimestamp();

View File

@@ -18,35 +18,17 @@ readonly class SignedUrlPost extends SignedUrl
public function __construct(
string $url,
\DateTimeImmutable $expires,
/**
* @Serializer\Groups({"read"})
*/
#[Serializer\Groups(['read'])]
public int $max_file_size,
/**
* @Serializer\Groups({"read"})
*/
#[Serializer\Groups(['read'])]
public int $max_file_count,
/**
* @Serializer\Groups({"read"})
*/
#[Serializer\Groups(['read'])]
public int $submit_delay,
/**
* @Serializer\Groups({"read"})
*/
#[Serializer\Groups(['read'])]
public string $redirect,
/**
* @Serializer\Groups({"read"})
*/
#[Serializer\Groups(['read'])]
public string $prefix,
/**
* @Serializer\Groups({"read"})
*/
#[Serializer\Groups(['read'])]
public string $signature,
) {
parent::__construct('POST', $url, $expires);