From a974d1556562666d2b8f43fdf757e6c13f9725e7 Mon Sep 17 00:00:00 2001 From: Wilco Louwerse Date: Tue, 5 Mar 2024 17:43:07 +0100 Subject: [PATCH 1/3] Rename FindGithubRepositoryThroughOrganizationService --- .phpdoc-md | 2 +- src/ActionHandler/EnrichDownloadHandler.php | 2 +- .../EnrichOrganizationHandler.php | 2 +- ...ponentenCatalogusGetApplicationsCommand.php | 2 +- ...omponentenCatalogusGetComponentsCommand.php | 2 +- ...hubRepositoryThroughOrganizationCommand.php | 18 +++++++++--------- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.phpdoc-md b/.phpdoc-md index 6b2c36ee..87654921 100644 --- a/.phpdoc-md +++ b/.phpdoc-md @@ -9,7 +9,7 @@ return (object)[ '\OpenCatalogi\OpenCatalogiBundle\Service\EnrichPubliccodeFromGithubUrlService', '\OpenCatalogi\OpenCatalogiBundle\Service\EnrichPubliccodeService', '\OpenCatalogi\OpenCatalogiBundle\Service\FederalizationService', - '\OpenCatalogi\OpenCatalogiBundle\Service\FindGithubRepositoryThroughOrganizationService', + '\OpenCatalogi\OpenCatalogiBundle\Service\FindRepositoryThroughOrganizationService', '\OpenCatalogi\OpenCatalogiBundle\Service\FindOrganizationThroughRepositoriesService', '\OpenCatalogi\OpenCatalogiBundle\Service\GithubApiService', '\OpenCatalogi\OpenCatalogiBundle\Service\GithubEventService', diff --git a/src/ActionHandler/EnrichDownloadHandler.php b/src/ActionHandler/EnrichDownloadHandler.php index 15c4c8a1..360f7803 100644 --- a/src/ActionHandler/EnrichDownloadHandler.php +++ b/src/ActionHandler/EnrichDownloadHandler.php @@ -4,7 +4,7 @@ use CommonGateway\CoreBundle\ActionHandler\ActionHandlerInterface; use OpenCatalogi\OpenCatalogiBundle\Service\DownloadObjectService; -use OpenCatalogi\OpenCatalogiBundle\Service\FindGithubRepositoryThroughOrganizationService; +use OpenCatalogi\OpenCatalogiBundle\Service\FindRepositoryThroughOrganizationService; use OpenCatalogi\OpenCatalogiBundle\Service\GithubApiService; /** diff --git a/src/ActionHandler/EnrichOrganizationHandler.php b/src/ActionHandler/EnrichOrganizationHandler.php index a986e4f6..4098304c 100644 --- a/src/ActionHandler/EnrichOrganizationHandler.php +++ b/src/ActionHandler/EnrichOrganizationHandler.php @@ -4,7 +4,7 @@ use CommonGateway\CoreBundle\ActionHandler\ActionHandlerInterface; use OpenCatalogi\OpenCatalogiBundle\Service\EnrichOrganizationService; -use OpenCatalogi\OpenCatalogiBundle\Service\FindGithubRepositoryThroughOrganizationService; +use OpenCatalogi\OpenCatalogiBundle\Service\FindRepositoryThroughOrganizationService; use OpenCatalogi\OpenCatalogiBundle\Service\GithubApiService; /** diff --git a/src/Command/ComponentenCatalogusGetApplicationsCommand.php b/src/Command/ComponentenCatalogusGetApplicationsCommand.php index 19dd5595..efb528a5 100644 --- a/src/Command/ComponentenCatalogusGetApplicationsCommand.php +++ b/src/Command/ComponentenCatalogusGetApplicationsCommand.php @@ -11,7 +11,7 @@ use Symfony\Component\Console\Style\SymfonyStyle; /** - * Command to execute the FindGithubRepositoryThroughOrganizationService. + * Command to execute the FindRepositoryThroughOrganizationService. */ class ComponentenCatalogusGetApplicationsCommand extends Command { diff --git a/src/Command/ComponentenCatalogusGetComponentsCommand.php b/src/Command/ComponentenCatalogusGetComponentsCommand.php index a5094305..4f5c7cdf 100644 --- a/src/Command/ComponentenCatalogusGetComponentsCommand.php +++ b/src/Command/ComponentenCatalogusGetComponentsCommand.php @@ -11,7 +11,7 @@ use Symfony\Component\Console\Style\SymfonyStyle; /** - * Command to execute the FindGithubRepositoryThroughOrganizationService. + * Command to execute the FindRepositoryThroughOrganizationService. */ class ComponentenCatalogusGetComponentsCommand extends Command { diff --git a/src/Command/FindGithubRepositoryThroughOrganizationCommand.php b/src/Command/FindGithubRepositoryThroughOrganizationCommand.php index ec8f56fa..1bf9a106 100644 --- a/src/Command/FindGithubRepositoryThroughOrganizationCommand.php +++ b/src/Command/FindGithubRepositoryThroughOrganizationCommand.php @@ -3,7 +3,7 @@ namespace OpenCatalogi\OpenCatalogiBundle\Command; use CommonGateway\CoreBundle\Service\GatewayResourceService; -use OpenCatalogi\OpenCatalogiBundle\Service\FindGithubRepositoryThroughOrganizationService; +use OpenCatalogi\OpenCatalogiBundle\Service\FindRepositoryThroughOrganizationService; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -11,7 +11,7 @@ use Symfony\Component\Console\Style\SymfonyStyle; /** - * Command to execute the FindGithubRepositoryThroughOrganizationService. + * Command to execute the FindRepositoryThroughOrganizationService. */ class FindGithubRepositoryThroughOrganizationCommand extends Command { @@ -23,9 +23,9 @@ class FindGithubRepositoryThroughOrganizationCommand extends Command protected static $defaultName = 'opencatalogi:github:discoverrepository'; /** - * @var FindGithubRepositoryThroughOrganizationService + * @var FindRepositoryThroughOrganizationService */ - private FindGithubRepositoryThroughOrganizationService $findGitService; + private FindRepositoryThroughOrganizationService $findGitService; /** * @var GatewayResourceService @@ -34,11 +34,11 @@ class FindGithubRepositoryThroughOrganizationCommand extends Command /** - * @param FindGithubRepositoryThroughOrganizationService $findGitService find Github Repository Through Organization Service + * @param FindRepositoryThroughOrganizationService $findGitService find Github Repository Through Organization Service * @param GatewayResourceService $resourceService The Gateway Resource Service */ public function __construct( - FindGithubRepositoryThroughOrganizationService $findGitService, + FindRepositoryThroughOrganizationService $findGitService, GatewayResourceService $resourceService ) { $this->findGitService = $findGitService; @@ -54,7 +54,7 @@ public function __construct( protected function configure(): void { $this - ->setDescription('This command triggers OpenCatalogi FindGithubRepositoryThroughOrganizationService') + ->setDescription('This command triggers OpenCatalogi FindRepositoryThroughOrganizationService') ->setHelp('This command allows you to update create owned repositories from organisation') ->addOption('organizationId', 'o', InputOption::VALUE_OPTIONAL, 'Find owned repositories for a specific organisation by id'); @@ -76,12 +76,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int $organizationId = $input->getOption('organizationId', false); if ($organizationId === null) { - if (empty($this->findGitService->findGithubRepositoryThroughOrganizationHandler([], $configuration)) === true) { + if (empty($this->findGitService->findRepositoryThroughOrganizationHandler([], $configuration)) === true) { return Command::FAILURE; } } - if (empty($this->findGitService->findGithubRepositoryThroughOrganizationHandler([], $configuration, $organizationId)) === true) { + if (empty($this->findGitService->findRepositoryThroughOrganizationHandler([], $configuration, $organizationId)) === true) { return Command::FAILURE; } From 7c088a9bdd9bea7b034918ba41ac4a090adcd958 Mon Sep 17 00:00:00 2001 From: GitHub Actions <> Date: Tue, 5 Mar 2024 16:43:36 +0000 Subject: [PATCH 2/3] Update src from PHP Codesniffer --- src/Command/FindGithubRepositoryThroughOrganizationCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/FindGithubRepositoryThroughOrganizationCommand.php b/src/Command/FindGithubRepositoryThroughOrganizationCommand.php index 1bf9a106..fe0efd97 100644 --- a/src/Command/FindGithubRepositoryThroughOrganizationCommand.php +++ b/src/Command/FindGithubRepositoryThroughOrganizationCommand.php @@ -35,7 +35,7 @@ class FindGithubRepositoryThroughOrganizationCommand extends Command /** * @param FindRepositoryThroughOrganizationService $findGitService find Github Repository Through Organization Service - * @param GatewayResourceService $resourceService The Gateway Resource Service + * @param GatewayResourceService $resourceService The Gateway Resource Service */ public function __construct( FindRepositoryThroughOrganizationService $findGitService, From 79e44f3253557e3634617683cf02e3e3d4fdbbe9 Mon Sep 17 00:00:00 2001 From: Wilco Louwerse Date: Thu, 7 Mar 2024 10:26:45 +0100 Subject: [PATCH 3/3] Remove unused uses --- src/ActionHandler/EnrichDownloadHandler.php | 2 -- src/ActionHandler/EnrichOrganizationHandler.php | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/ActionHandler/EnrichDownloadHandler.php b/src/ActionHandler/EnrichDownloadHandler.php index 360f7803..a667a825 100644 --- a/src/ActionHandler/EnrichDownloadHandler.php +++ b/src/ActionHandler/EnrichDownloadHandler.php @@ -4,8 +4,6 @@ use CommonGateway\CoreBundle\ActionHandler\ActionHandlerInterface; use OpenCatalogi\OpenCatalogiBundle\Service\DownloadObjectService; -use OpenCatalogi\OpenCatalogiBundle\Service\FindRepositoryThroughOrganizationService; -use OpenCatalogi\OpenCatalogiBundle\Service\GithubApiService; /** * Executes a the EnrichOrganizationHandler and gets an organization from the response of the githubEventAction and formInputAction diff --git a/src/ActionHandler/EnrichOrganizationHandler.php b/src/ActionHandler/EnrichOrganizationHandler.php index 4098304c..96e8100f 100644 --- a/src/ActionHandler/EnrichOrganizationHandler.php +++ b/src/ActionHandler/EnrichOrganizationHandler.php @@ -4,8 +4,6 @@ use CommonGateway\CoreBundle\ActionHandler\ActionHandlerInterface; use OpenCatalogi\OpenCatalogiBundle\Service\EnrichOrganizationService; -use OpenCatalogi\OpenCatalogiBundle\Service\FindRepositoryThroughOrganizationService; -use OpenCatalogi\OpenCatalogiBundle\Service\GithubApiService; /** * Executes a the EnrichOrganizationHandler and gets an organization from the response of the githubEventAction and formInputAction