Skip to content
Snippets Groups Projects
Commit 11efcab1 authored by Jürgen Haas's avatar Jürgen Haas
Browse files

Issue #3499329 by jurgenhaas: Fix tests with PhpCS

parent 3bb9de6c
No related branches found
No related tags found
No related merge requests found
Pipeline #494412 passed
......@@ -7,7 +7,10 @@ use Drupal\Core\Extension\ExtensionNameLengthException;
use Drupal\Core\Extension\MissingDependencyException;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Extension\ModuleInstallerInterface;
use Drush\Attributes as CLI;
use Drush\Attributes\Argument;
use Drush\Attributes\Command;
use Drush\Attributes\Option;
use Drush\Attributes\Usage;
use Drush\Commands\DrushCommands;
use Symfony\Component\DependencyInjection\ContainerInterface;
......@@ -87,10 +90,10 @@ class DevModulesCommands extends DrushCommands {
*
* @throws \Exception
*/
#[CLI\Command(name: 'site:dev', aliases: ['dev-modules', 'dev'])]
#[CLI\Argument('flag', 'On or off, yes or no, True or False, 1 or 0.')]
#[CLI\Option('list', 'Only determine the list of modules and print that list to the console.')]
#[CLI\Usage(name: 'site:dev', description: 'Enable/disable all development modules at once.')]
#[Command(name: 'site:dev', aliases: ['dev-modules', 'dev'])]
#[Argument('flag', 'On or off, yes or no, True or False, 1 or 0.')]
#[Option('list', 'Only determine the list of modules and print that list to the console.')]
#[Usage(name: 'site:dev', description: 'Enable/disable all development modules at once.')]
public function devMode(string $flag, array $options = ['list' => FALSE]): void {
$list = $this
->setEnableMode($flag)
......@@ -109,9 +112,9 @@ class DevModulesCommands extends DrushCommands {
*
* @throws \JsonException
*/
#[CLI\Command(name: 'site:init', aliases: ['init-site'])]
#[CLI\Argument('initFile', 'Filename with instructions.')]
#[CLI\Usage(name: 'site:init filename', description: 'Init site by following instructions in given file.')]
#[Command(name: 'site:init', aliases: ['init-site'])]
#[Argument('initFile', 'Filename with instructions.')]
#[Usage(name: 'site:init filename', description: 'Init site by following instructions in given file.')]
public function initSite(string $initFile): void {
$instructions = json_decode(file_get_contents($initFile), TRUE, 512, JSON_THROW_ON_ERROR);
foreach ($instructions['config'] as $configName => $keys) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment