Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Command/ExportScripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ protected function configure(): void {
parent::configure();
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$scriptId = $input->getOption('id');
$scriptId = $scriptId ? intval($scriptId) : null;
if ($scriptId !== null) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/ImportScripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected function configure(): void {
parent::configure();
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$json = file_get_contents("php://stdin");
if (false === $json) {
$output->writeln('<error>You need an interactive terminal to run this command</error>');
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/ListScripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function configure(): void {
parent::configure();
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$output->writeln('<info>Listing file actions:</info>');
$scripts = $this->scriptMapper->findAll();

Expand Down
6 changes: 3 additions & 3 deletions lib/Command/RunScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ protected function configure(): void {
parent::configure();
}

protected function execute(InputInterface $input, OutputInterface $output) {
protected function execute(InputInterface $input, OutputInterface $output): int {
$scriptId = $input->getArgument('id');
$userId = $input->getOption('user');
$scriptInputsJson = $input->getOption('inputs') ?? '{}';
$fileInputs = $input->getOption('file') ?? [];

try {
$scriptInputsData = json_decode($scriptInputsJson, true, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $err) {
Expand Down Expand Up @@ -77,7 +77,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
if (ctype_digit(strval($fileInput))) {
$nodes = $rootFolder->getById(intval($fileInput));
if (!isset($nodes[0])) {
$output->writeln('<error>Could not find input file ' . $fileInput . ' belonging in root folder ' . $rootFolder->getPath() . ' for file action</error>');
$output->writeln('<error>Could not find input file ' . $fileInput . ' belonging in root folder ' . $rootFolder->getPath() . ' for file action</error>');
return 1;
}
$file = $nodes[0];
Expand Down