Skip to content

Commit

Permalink
Update slevomat/coding-standard
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Mar 11, 2024
1 parent a52dddc commit 1daaabe
Show file tree
Hide file tree
Showing 18 changed files with 11 additions and 70 deletions.
22 changes: 11 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/Command/Api/ApiBaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,6 @@ private function createCallableValidator(InputArgument $argument, array $params)
}

/**
* @param array $schema
* @param array $constraints
* @return array<mixed>
*/
private function createLengthConstraint(array $schema, array $constraints): array {
Expand All @@ -282,8 +280,6 @@ private function createLengthConstraint(array $schema, array $constraints): arra
}

/**
* @param array $schema
* @param array $constraints
* @return array<mixed>
*/
protected function createRegexConstraint(array $schema, array $constraints): array {
Expand Down Expand Up @@ -389,7 +385,6 @@ private function askFreeFormQuestion(InputArgument $argument, array $params): mi
}

/**
* @param array $paramSpec
* @return null|array<mixed>
*/
private function getParamTypeOneOf(array $paramSpec): ?array {
Expand Down
19 changes: 0 additions & 19 deletions src/Command/Api/ApiCommandHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ private function addOptionExampleToUsageForGetEndpoint(array $paramDefinition, s
return $usage;
}

/**
* @param array $schema
* @param array $acquiaCloudSpec
*/
private function addApiCommandParameters(array $schema, array $acquiaCloudSpec, ApiBaseCommand $command): void {
$inputDefinition = [];
$usage = '';
Expand Down Expand Up @@ -112,8 +108,6 @@ private function addApiCommandParameters(array $schema, array $acquiaCloudSpec,
}

/**
* @param array $schema
* @param array $acquiaCloudSpec
* @return array<mixed>
*/
private function addApiCommandParametersForRequestBody(array $schema, array $acquiaCloudSpec): array {
Expand Down Expand Up @@ -211,8 +205,6 @@ private function addPostArgumentUsageToExample(mixed $requestBody, mixed $propKe
}

/**
* @param array $schema
* @param array $acquiaCloudSpec
* @return array<mixed>
*/
private function addApiCommandParametersForPathAndQuery(array $schema, array $acquiaCloudSpec): array {
Expand Down Expand Up @@ -255,10 +247,6 @@ private function addApiCommandParametersForPathAndQuery(array $schema, array $ac
return [$inputDefinition, $usage];
}

/**
* @param array $acquiaCloudSpec
* @param $schema
*/
private function getParameterDefinitionFromSpec(string $paramKey, array $acquiaCloudSpec, mixed $schema): mixed {
$uppercaseKey = ucfirst($paramKey);
if (array_key_exists('parameters', $acquiaCloudSpec['components'])
Expand Down Expand Up @@ -421,8 +409,6 @@ private function addAliasParameterDescriptions(mixed &$paramDefinition): void {
}

/**
* @param array $schema
* @param array $acquiaCloudSpec
* @return array<mixed>
*/
private function getRequestBodyFromParameterSchema(array $schema, array $acquiaCloudSpec): array {
Expand All @@ -439,10 +425,6 @@ private function getRequestBodyFromParameterSchema(array $schema, array $acquiaC
return $requestBodySchema;
}

/**
* @param array $requestBodySchema
* @param $parameterDefinition
*/
private function getPropertySpecFromRequestBodyParam(array $requestBodySchema, mixed $parameterDefinition): mixed {
return $requestBodySchema['properties'][$parameterDefinition->getName()] ?? NULL;
}
Expand Down Expand Up @@ -477,7 +459,6 @@ public static function restoreRenamedParameter(string $propKey): int|string {
}

/**
* @param array $apiCommands
* @return ApiListCommandBase[]
*/
private function generateApiListCommands(array $apiCommands, string $commandPrefix, CommandFactoryInterface $commandFactory): array {
Expand Down
7 changes: 0 additions & 7 deletions src/Command/CodeStudio/CodeStudioPipelinesMigrateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int

/**
* Check whether wizard command is executed by checking the env variable of codestudio project.
*
* @param array $project
*/
private function checkGitLabCiCdVariables(array $project): void {
$gitlabCicdVariables = CodeStudioCiCdVariables::getList();
Expand All @@ -93,7 +91,6 @@ private function checkGitLabCiCdVariables(array $project): void {
/**
* Check acquia-pipeline.yml file exists in the root repo and remove ci_config_path from codestudio project.
*
* @param array $project
* @return array<mixed>
*/
private function getAcquiaPipelinesFileContents(array $project): array {
Expand Down Expand Up @@ -163,10 +160,6 @@ private function getPipelinesSection(array $acquiaPipelinesFileContents, string
return $acquiaPipelinesFileContents['events'][$eventName]['steps'] ?? NULL;
}

/**
* @param array $acquiaPipelinesFileContents
* @param array $gitlabCiFileContents
*/
private function migrateEventsSection(array $acquiaPipelinesFileContents, array &$gitlabCiFileContents): void {
// phpcs:disable SlevomatCodingStandard.Arrays.AlphabeticallySortedByKeys
$eventsMap = [
Expand Down
2 changes: 0 additions & 2 deletions src/Command/CodeStudio/CodeStudioWizardCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

/**
* @param array $project
* @return array<mixed>|null
*/
private function getGitLabScheduleByDescription(array $project, string $scheduledPipelineDescription): ?array {
Expand All @@ -154,7 +153,6 @@ private function getGitLabScheduleByDescription(array $project, string $schedule
}

/**
* @param array $project
* @return array<mixed>|null ?
*/
private function getGitLabProjectAccessTokenByName(array $project, string $name): ?array {
Expand Down
2 changes: 0 additions & 2 deletions src/Command/Email/ConfigurePlatformEmailCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int

/**
* Generates Zone File for DNS records of the registered domain.
*
* @param array $records
*/
private function generateZoneFile(string $baseDomain, array $records): void {

Expand Down
4 changes: 0 additions & 4 deletions src/Command/Email/EmailInfoForSubscriptionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
/**
* Renders tables showing email domain verification statuses,
* as well as exports these statuses to respective CSV files.
*
* @param array $domainList
*/
private function writeDomainsToTables(OutputInterface $output, SubscriptionResponse $subscription, array $domainList): void {

Expand Down Expand Up @@ -156,8 +154,6 @@ private function writeDomainsToTables(OutputInterface $output, SubscriptionRespo

/**
* Nicely renders a given array of tables.
*
* @param array $tables
*/
private function renderDomainInfoTables(array $tables): void {
foreach ($tables as $table) {
Expand Down
1 change: 0 additions & 1 deletion src/DataStore/Datastore.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public function exists(string $key): bool {
}

/**
* @param array $config
* @param string $path Path to the datastore on disk.
* @return array<mixed>
*/
Expand Down
3 changes: 0 additions & 3 deletions src/DataStore/JsonDataStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ public function dump(): void {
$this->fileSystem->dumpFile($this->filepath, json_encode($this->data->export(), JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT));
}

/**
* @param array $array
*/
protected function cleanLegacyConfig(array &$array): bool {
// Legacy format of credential storage.
$dump = FALSE;
Expand Down
5 changes: 0 additions & 5 deletions src/Helpers/SshHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public function __construct(
/**
* Execute the command in a remote environment.
*
* @param array $commandArgs
* @param int|null $timeout
*/
public function executeCommand(EnvironmentResponse|string $target, array $commandArgs, bool $printOutput = TRUE, int $timeout = NULL): Process {
Expand Down Expand Up @@ -66,8 +65,6 @@ private function sendCommand(?string $url, array $command, bool $printOutput, ?i

/**
* Return the first item of the $commandArgs that is not an option.
*
* @param array $commandArgs
*/
private function firstArguments(array $commandArgs): string {
$result = '';
Expand Down Expand Up @@ -98,8 +95,6 @@ private function getOutputCallback(): callable {
* Return a summary of the command that does not include the
* arguments. This avoids potential information disclosure in
* CI scripts.
*
* @param array $commandArgs
*/
private function getCommandSummary(array $commandArgs): string {
return $this->firstArguments($commandArgs);
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/src/AcsfApi/AcsfServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public function providerTestIsMachineAuthenticated(): array {

/**
* @dataProvider providerTestIsMachineAuthenticated
* @param array $envVars
*/
public function testIsMachineAuthenticated(array $envVars, bool $isAuthenticated): void {
self::setEnvVars($envVars);
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/src/CloudApi/AcsfClientServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public function providerTestIsMachineAuthenticated(): array {

/**
* @dataProvider providerTestIsMachineAuthenticated
* @param array $envVars
*/
public function testIsMachineAuthenticated(array $envVars, bool $isAuthenticated): void {
self::setEnvVars($envVars);
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/src/CloudApi/ClientServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public function providerTestIsMachineAuthenticated(): array {

/**
* @dataProvider providerTestIsMachineAuthenticated
* @param array $envVars
*/
public function testIsMachineAuthenticated(array $envVars, bool $isAuthenticated): void {
self::setEnvVars($envVars);
Expand Down
2 changes: 0 additions & 2 deletions tests/phpunit/src/Commands/Acsf/AcsfAuthLogoutCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ public function providerTestAuthLogoutCommand(): array {

/**
* @dataProvider providerTestAuthLogoutCommand
* @param array $inputs
* @param array $config
*/
public function testAcsfAuthLogoutCommand(bool $machineIsAuthenticated, array $inputs, array $config = []): void {
if (!$machineIsAuthenticated) {
Expand Down
2 changes: 0 additions & 2 deletions tests/phpunit/src/Commands/App/NewCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public function provideTestNewNextJsAppCommand(): array {

/**
* @dataProvider provideTestNewDrupalCommand
* @param array $package
*/
public function testNewDrupalCommand(array $package, string $directory = 'drupal'): void {
$this->newProjectDir = Path::makeAbsolute($directory, $this->projectDir);
Expand Down Expand Up @@ -88,7 +87,6 @@ public function testNewDrupalCommand(array $package, string $directory = 'drupal

/**
* @dataProvider provideTestNewNextJsAppCommand
* @param array $package
*/
public function testNewNextJSAppCommand(array $package, string $directory = 'nextjs'): void {
$this->newProjectDir = Path::makeAbsolute($directory, $this->projectDir);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ public function providerTestRemoteAliasesDownloadCommand(): array {
}

/**
* @param array $inputs
* @param array $args
* @param string|null $destinationDir
* @param bool $all Download aliases for all applications.
* @dataProvider providerTestRemoteAliasesDownloadCommand
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/src/Commands/Remote/DrushCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public function providerTestRemoteDrushCommand(): array {

/**
* @dataProvider providerTestRemoteDrushCommand
* @param array $args
* @group serial
*/
public function testRemoteDrushCommand(array $args): void {
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/src/Commands/TelemetryCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public function providerTestTelemetryPrompt(): array {
* Tests telemetry prompt.
*
* @dataProvider providerTestTelemetryPrompt
* @param array $inputs
* @param $message
*/
public function testTelemetryPrompt(array $inputs, mixed $message): void {
Expand Down

0 comments on commit 1daaabe

Please sign in to comment.