Skip to content

Commit

Permalink
Merge pull request afup#1376 from Mopolo/phpstan-command-return
Browse files Browse the repository at this point in the history
Ajout d'un code de retour aux commandes
  • Loading branch information
agallou authored Dec 5, 2023
2 parents 97c44d7 + ead457f commit 91d12b7
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/CfpNotificationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$this->getContainer()->get(\AppBundle\Notifier\SlackNotifier::class)->sendMessage($message);
}

return 0;
}
}
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/CleanThrottlingCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ protected function configure()
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->getContainer()->get(\AppBundle\Security\ActionThrottling\ActionThrottling::class)->clearOldLogs();

return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
curl_exec($curl);

$output->writeln("Appel au callback de paiement de cotisation effectué");

return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->urlGenerator
));
}

return 0;
}
}
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/IndexMeetupsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$runner = new Runner($algoliaClient, $meetupRepository);
$runner->run();

return 0;
}
}
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/IndexTalksCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ protected function configure()
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->runner->run();

return 0;
}
}
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/RegistrationsExporterCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$file = new \SplFileObject($input->getArgument('file'), 'w+');

$container->get(\AppBundle\Event\Ticket\RegistrationsExportGenerator::class)->export($event, $file);

return 0;
}
}
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/SlackMemberNotificationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$message = $this->getContainer()->get(\AppBundle\Slack\MessageFactory::class)->createMessageForMemberNotification($nbResults);
$this->getContainer()->get(\AppBundle\Notifier\SlackNotifier::class)->sendMessage($message);
}

return 0;
}
}
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/SubscriptionReminderCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln(sprintf('<info>%s entreprises</info>', $users->count()));
$this->handleReminders($output, $reminder, $users, $dryRun);
}

return 0;
}

private function handleReminders(
Expand Down
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/SynchMembersCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
->setLogger($container->get('logger'))
->synchronize()
;

return 0;
}
}
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/SynchTechLetterCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
->setLogger($container->get('logger'))
->synchronize()
;

return 0;
}
}
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/TicketStatsNotificationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$this->getContainer()->get(\AppBundle\Notifier\SlackNotifier::class)->sendMessage($message);
}

return 0;
}
}
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/TwitterBotCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
$container->get(\TwitterAPIExchange::class)
);
$runner->execute($this->getEventFilter($input));

return 0;
}

/**
Expand Down
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/TwitterListCreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ protected function execute(InputInterface $input, OutputInterface $output)

$twitterListCreator = new ListCreator($container->get(\TwitterAPIExchange::class), $ting->get(SpeakerRepository::class));
$twitterListCreator->create($event, $input->getOption('custom-name'));

return 0;
}

/**
Expand Down
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/UpdateCompanyMemberStateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$companyMember->setStatus($hasUptoDateMembershipFee ? 1 : 0);
$companyMemberRepository->save($companyMember);
}

return 0;
}
}
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/UpdateMailchimpMembersCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
} else {
$output->writeln("Pas d'erreur durant le traitement");
}

return 0;
}
}
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/UpdateUserStateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$user->setStatus($hasUptoDateMembershipFee ? User::STATUS_ACTIVE : User::STATUS_INACTIVE);
$userRepository->save($user);
}

return 0;
}
}
2 changes: 2 additions & 0 deletions sources/AppBundle/Command/VideosDataCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

$output->writeln(json_encode($data, JSON_PRETTY_PRINT));

return 0;
}
}

0 comments on commit 91d12b7

Please sign in to comment.