mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 12:33:49 +00:00
Apply rector rules: symfony up to 54
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -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();
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user