Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename FindGithubRepositoryThroughOrganizationService #184

Merged
merged 4 commits into from
Mar 7, 2024
Merged
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 .phpdoc-md
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 0 additions & 2 deletions src/ActionHandler/EnrichDownloadHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

use CommonGateway\CoreBundle\ActionHandler\ActionHandlerInterface;
use OpenCatalogi\OpenCatalogiBundle\Service\DownloadObjectService;
use OpenCatalogi\OpenCatalogiBundle\Service\FindGithubRepositoryThroughOrganizationService;
use OpenCatalogi\OpenCatalogiBundle\Service\GithubApiService;

/**
* Executes a the EnrichOrganizationHandler and gets an organization from the response of the githubEventAction and formInputAction

Check warning on line 9 in src/ActionHandler/EnrichDownloadHandler.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 131 characters

Check warning on line 9 in src/ActionHandler/EnrichDownloadHandler.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 131 characters

Check warning on line 9 in src/ActionHandler/EnrichDownloadHandler.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 131 characters
* and enriches the organization.
*/
class EnrichDownloadHandler implements ActionHandlerInterface
Expand Down
2 changes: 0 additions & 2 deletions src/ActionHandler/EnrichOrganizationHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

use CommonGateway\CoreBundle\ActionHandler\ActionHandlerInterface;
use OpenCatalogi\OpenCatalogiBundle\Service\EnrichOrganizationService;
use OpenCatalogi\OpenCatalogiBundle\Service\FindGithubRepositoryThroughOrganizationService;
use OpenCatalogi\OpenCatalogiBundle\Service\GithubApiService;

/**
* Executes a the EnrichOrganizationHandler and gets an organization from the response of the githubEventAction and formInputAction
Expand Down Expand Up @@ -35,7 +33,7 @@
*
* @return array a [json-schema](https://json-schema.org/) that this action should comply to
*/
public function getConfiguration()

Check warning on line 36 in src/ActionHandler/EnrichOrganizationHandler.php

View workflow job for this annotation

GitHub Actions / build

The method getConfiguration() has 118 lines of code. Current threshold is set to 100. Avoid really long methods.

Check warning on line 36 in src/ActionHandler/EnrichOrganizationHandler.php

View workflow job for this annotation

GitHub Actions / build

The method getConfiguration() has 118 lines of code. Current threshold is set to 100. Avoid really long methods.

Check warning on line 36 in src/ActionHandler/EnrichOrganizationHandler.php

View workflow job for this annotation

GitHub Actions / build

The method getConfiguration() has 118 lines of code. Current threshold is set to 100. Avoid really long methods.
{
return [
'$id' => 'https://opencatalogi.nl/ActionHandler/EnrichOrganizationHandler.ActionHandler.json',
Expand Down
2 changes: 1 addition & 1 deletion src/Command/ComponentenCatalogusGetApplicationsCommand.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

Check failure on line 2 in src/Command/ComponentenCatalogusGetApplicationsCommand.php

View workflow job for this annotation

GitHub Actions / build

Missing file doc comment

Check failure on line 2 in src/Command/ComponentenCatalogusGetApplicationsCommand.php

View workflow job for this annotation

GitHub Actions / build

Missing file doc comment
namespace OpenCatalogi\OpenCatalogiBundle\Command;

use CommonGateway\CoreBundle\Service\GatewayResourceService;
Expand All @@ -11,28 +11,28 @@
use Symfony\Component\Console\Style\SymfonyStyle;

/**
* Command to execute the FindGithubRepositoryThroughOrganizationService.
* Command to execute the FindRepositoryThroughOrganizationService.
*/
class ComponentenCatalogusGetApplicationsCommand extends Command
{

/**

Check failure on line 19 in src/Command/ComponentenCatalogusGetApplicationsCommand.php

View workflow job for this annotation

GitHub Actions / build

Missing short description in doc comment

Check failure on line 19 in src/Command/ComponentenCatalogusGetApplicationsCommand.php

View workflow job for this annotation

GitHub Actions / build

Missing short description in doc comment
* @var string
*/
protected static $defaultName = 'opencatalogi:componentencatalogus:applications';

/**

Check failure on line 24 in src/Command/ComponentenCatalogusGetApplicationsCommand.php

View workflow job for this annotation

GitHub Actions / build

Missing short description in doc comment
* @var ComponentenCatalogusService
*/
private ComponentenCatalogusService $compCatService;

/**

Check failure on line 29 in src/Command/ComponentenCatalogusGetApplicationsCommand.php

View workflow job for this annotation

GitHub Actions / build

Missing short description in doc comment
* @var GatewayResourceService
*/
private GatewayResourceService $resourceService;


/**

Check failure on line 35 in src/Command/ComponentenCatalogusGetApplicationsCommand.php

View workflow job for this annotation

GitHub Actions / build

Missing short description in doc comment
* @param ComponentenCatalogusService $compCatService componenten Catalogus Service
* @param GatewayResourceService $resourceService The Gateway Resource Service
*/
Expand All @@ -47,20 +47,20 @@
}//end __construct()


/**

Check failure on line 50 in src/Command/ComponentenCatalogusGetApplicationsCommand.php

View workflow job for this annotation

GitHub Actions / build

Missing short description in doc comment
* @return void
*/
protected function configure(): void
{
$this
->setDescription('This command triggers OpenCatalogi ComponentenCatalogusService')
->setHelp('This command allows you to get all applications or one application from componentencatalogus.commonground.nl/api/products')

Check warning on line 57 in src/Command/ComponentenCatalogusGetApplicationsCommand.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 146 characters

Check warning on line 57 in src/Command/ComponentenCatalogusGetApplicationsCommand.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 146 characters

Check warning on line 57 in src/Command/ComponentenCatalogusGetApplicationsCommand.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 146 characters
->addOption('application', 'a', InputOption::VALUE_OPTIONAL, 'Get a single application by id');

}//end configure()


/**

Check failure on line 63 in src/Command/ComponentenCatalogusGetApplicationsCommand.php

View workflow job for this annotation

GitHub Actions / build

Missing short description in doc comment
* @param InputInterface $input The input
* @param OutputInterface $output The output
*
Expand All @@ -68,7 +68,7 @@
*/
protected function execute(InputInterface $input, OutputInterface $output): int
{
$componentenAction = $this->resourceService->getAction('https://opencatalogi.nl/action/oc.ComponentenCatalogusApplicationToGatewayAction.action.json', 'open-catalogi/open-catalogi-bundle');

Check failure on line 71 in src/Command/ComponentenCatalogusGetApplicationsCommand.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds maximum limit of 150 characters; contains 197 characters
$configuration = $componentenAction->getConfiguration();

// Handle the command options.
Expand Down
2 changes: 1 addition & 1 deletion src/Command/ComponentenCatalogusGetComponentsCommand.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php

Check failure on line 2 in src/Command/ComponentenCatalogusGetComponentsCommand.php

View workflow job for this annotation

GitHub Actions / build

Missing file doc comment
namespace OpenCatalogi\OpenCatalogiBundle\Command;

use CommonGateway\CoreBundle\Service\GatewayResourceService;
Expand All @@ -11,12 +11,12 @@
use Symfony\Component\Console\Style\SymfonyStyle;

/**
* Command to execute the FindGithubRepositoryThroughOrganizationService.
* Command to execute the FindRepositoryThroughOrganizationService.
*/
class ComponentenCatalogusGetComponentsCommand extends Command
{

/**

Check failure on line 19 in src/Command/ComponentenCatalogusGetComponentsCommand.php

View workflow job for this annotation

GitHub Actions / build

Missing short description in doc comment
* @var string
*/
protected static $defaultName = 'opencatalogi:componentencatalogus:components';
Expand Down Expand Up @@ -54,7 +54,7 @@
{
$this
->setDescription('This command triggers OpenCatalogi ComponentenCatalogusService')
->setHelp('This command allows you to get all components or one component from componentencatalogus.commonground.nl/api/components')

Check warning on line 57 in src/Command/ComponentenCatalogusGetComponentsCommand.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 144 characters

Check warning on line 57 in src/Command/ComponentenCatalogusGetComponentsCommand.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 144 characters

Check warning on line 57 in src/Command/ComponentenCatalogusGetComponentsCommand.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 144 characters
->addOption('component', 'c', InputOption::VALUE_OPTIONAL, 'Get a single component by id');

}//end configure()
Expand Down
14 changes: 7 additions & 7 deletions src/Command/FindGithubRepositoryThroughOrganizationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace OpenCatalogi\OpenCatalogiBundle\Command;

use CommonGateway\CoreBundle\Service\GatewayResourceService;
use OpenCatalogi\OpenCatalogiBundle\Service\FindGithubRepositoryThroughOrganizationService;
use OpenCatalogi\OpenCatalogiBundle\Service\FindRepositoryThroughOrganizationService;
use OpenCatalogi\OpenCatalogiBundle\Service\FindRepositoryThroughOrganizationService;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
Expand All @@ -12,7 +12,7 @@
use Symfony\Component\Console\Style\SymfonyStyle;

/**
* Command to execute the FindGithubRepositoryThroughOrganizationService.
* Command to execute the FindRepositoryThroughOrganizationService.
*/
class FindGithubRepositoryThroughOrganizationCommand extends Command
{
Expand All @@ -24,9 +24,9 @@
protected static $defaultName = 'opencatalogi:github:discoverrepository';

/**
* @var FindGithubRepositoryThroughOrganizationService
* @var FindRepositoryThroughOrganizationService
*/
private FindGithubRepositoryThroughOrganizationService $findGitService;
private FindRepositoryThroughOrganizationService $findGitService;

/**
* @var GatewayResourceService
Expand All @@ -35,8 +35,8 @@


/**
* @param FindGithubRepositoryThroughOrganizationService $findGitService find Github Repository Through Organization Service
* @param GatewayResourceService $resourceService The Gateway Resource Service
* @param FindRepositoryThroughOrganizationService $findGitService find Github Repository Through Organization Service
* @param GatewayResourceService $resourceService The Gateway Resource Service
*/
public function __construct(
FindRepositoryThroughOrganizationService $findGitService,
Expand All @@ -55,9 +55,9 @@
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');

Check warning on line 60 in src/Command/FindGithubRepositoryThroughOrganizationCommand.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 137 characters

Check warning on line 60 in src/Command/FindGithubRepositoryThroughOrganizationCommand.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 137 characters

Check warning on line 60 in src/Command/FindGithubRepositoryThroughOrganizationCommand.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 137 characters

}//end configure()

Expand All @@ -82,7 +82,7 @@
}
}

if (empty($this->findGitService->findRepositoryThroughOrganizationHandler([], $configuration, $organizationId)) === true) {

Check warning on line 85 in src/Command/FindGithubRepositoryThroughOrganizationCommand.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 131 characters

Check warning on line 85 in src/Command/FindGithubRepositoryThroughOrganizationCommand.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 131 characters

Check warning on line 85 in src/Command/FindGithubRepositoryThroughOrganizationCommand.php

View workflow job for this annotation

GitHub Actions / build

Line exceeds 125 characters; contains 131 characters
return Command::FAILURE;
}

Expand Down
Loading