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
Branches 2.1.x
No related tags found
No related merge requests found
Pipeline #494412 passed
...@@ -7,7 +7,10 @@ use Drupal\Core\Extension\ExtensionNameLengthException; ...@@ -7,7 +7,10 @@ use Drupal\Core\Extension\ExtensionNameLengthException;
use Drupal\Core\Extension\MissingDependencyException; use Drupal\Core\Extension\MissingDependencyException;
use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Extension\ModuleInstallerInterface; 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 Drush\Commands\DrushCommands;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
...@@ -87,10 +90,10 @@ class DevModulesCommands extends DrushCommands { ...@@ -87,10 +90,10 @@ class DevModulesCommands extends DrushCommands {
* *
* @throws \Exception * @throws \Exception
*/ */
#[CLI\Command(name: 'site:dev', aliases: ['dev-modules', 'dev'])] #[Command(name: 'site:dev', aliases: ['dev-modules', 'dev'])]
#[CLI\Argument('flag', 'On or off, yes or no, True or False, 1 or 0.')] #[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.')] #[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.')] #[Usage(name: 'site:dev', description: 'Enable/disable all development modules at once.')]
public function devMode(string $flag, array $options = ['list' => FALSE]): void { public function devMode(string $flag, array $options = ['list' => FALSE]): void {
$list = $this $list = $this
->setEnableMode($flag) ->setEnableMode($flag)
...@@ -109,9 +112,9 @@ class DevModulesCommands extends DrushCommands { ...@@ -109,9 +112,9 @@ class DevModulesCommands extends DrushCommands {
* *
* @throws \JsonException * @throws \JsonException
*/ */
#[CLI\Command(name: 'site:init', aliases: ['init-site'])] #[Command(name: 'site:init', aliases: ['init-site'])]
#[CLI\Argument('initFile', 'Filename with instructions.')] #[Argument('initFile', 'Filename with instructions.')]
#[CLI\Usage(name: 'site:init filename', description: 'Init site by following instructions in given file.')] #[Usage(name: 'site:init filename', description: 'Init site by following instructions in given file.')]
public function initSite(string $initFile): void { public function initSite(string $initFile): void {
$instructions = json_decode(file_get_contents($initFile), TRUE, 512, JSON_THROW_ON_ERROR); $instructions = json_decode(file_get_contents($initFile), TRUE, 512, JSON_THROW_ON_ERROR);
foreach ($instructions['config'] as $configName => $keys) { 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