Skip to content

Commit

Permalink
Symfony 6 preparations
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed Mar 7, 2024
1 parent c6cb78f commit 8211c34
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
5 changes: 2 additions & 3 deletions src/Commands/AdvancedlySignCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@ class AdvancedlySignCommand extends Command implements LoggerAwareInterface

protected $api;

protected static $defaultName = 'dbp:relay:esign:sign:advanced';

public function __construct(SignatureProviderInterface $api)
{
parent::__construct();
$this->api = $api;
}

protected function configure()
protected function configure(): void
{
$this->setName('dbp:relay:esign:sign:advanced');
$this->setDescription('Sign a PDF file');
$this->addArgument('profile-id', InputArgument::REQUIRED, 'Signing profile ID');
$this->addArgument('input-path', InputArgument::REQUIRED, 'Input PDF file path');
Expand Down
7 changes: 4 additions & 3 deletions src/Commands/QualifiedlySignCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerAwareTrait;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand All @@ -21,16 +22,15 @@ class QualifiedlySignCommand extends Command implements LoggerAwareInterface

protected $api;

protected static $defaultName = 'dbp:relay:esign:sign:qualified';

public function __construct(SignatureProviderInterface $api)
{
parent::__construct();
$this->api = $api;
}

protected function configure()
protected function configure(): void
{
$this->setName('dbp:relay:esign:sign:qualified');
$this->setDescription('Sign a PDF file');
$this->addArgument('profile-id', InputArgument::REQUIRED, 'Signing profile ID');
$this->addArgument('input-path', InputArgument::REQUIRED, 'Input PDF file path');
Expand All @@ -53,6 +53,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$output->writeln("Open the following URL in your browser:\n ".$url);
$question = new Question('After confirming your identity please enter the session ID: ');
$helper = $this->getHelper('question');
assert($helper instanceof QuestionHelper);
$sessionId = $helper->ask($input, $output, $question);

$signedData = $this->api->fetchQualifiedlySignedDocument($sessionId);
Expand Down
2 changes: 1 addition & 1 deletion src/DbpRelayEsignBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class DbpRelayEsignBundle extends Bundle
{
public function build(ContainerBuilder $container)
public function build(ContainerBuilder $container): void
{
}
}
8 changes: 4 additions & 4 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->end()
->integerNode('user_text_row')
->info('The index of the first unset row in the table (starts with 1)')
->example(1)
->example('1')
->end()
->scalarNode('user_text_attach_parent')
->info('In case there is content "child" will be attached to "parent" at "row" (optional)')
Expand All @@ -64,7 +64,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->end()
->integerNode('user_text_attach_row')
->info('In case there is content "child" will be attached to "parent" at "row" (optional)')
->example(4)
->example('4')
->end()
->end()
->end()
Expand Down Expand Up @@ -102,7 +102,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->end()
->integerNode('user_text_row')
->info('The index of the first unset row in the table (starts with 1)')
->example(1)
->example('1')
->end()
->scalarNode('user_text_attach_parent')
->info('In case there is content "child" will be attached to "parent" at "row" (optional)')
Expand All @@ -114,7 +114,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->end()
->integerNode('user_text_attach_row')
->info('In case there is content "child" will be attached to "parent" at "row" (optional)')
->example(4)
->example('4')
->end()
->end()
->end()
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/DbpRelayEsignExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class DbpRelayEsignExtension extends ConfigurableExtension
{
use ExtensionTrait;

public function loadInternal(array $mergedConfig, ContainerBuilder $container)
public function loadInternal(array $mergedConfig, ContainerBuilder $container): void
{
$pathsToHide = [
'/esign/advancedly-signed-documents/{identifier}',
Expand Down

0 comments on commit 8211c34

Please sign in to comment.