Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dev_modules
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
dev_modules
Commits
11efcab1
Commit
11efcab1
authored
4 months ago
by
Jürgen Haas
Browse files
Options
Downloads
Patches
Plain Diff
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
3 days ago
Stage: build
Stage: validate
Changes
1
Pipelines
18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DevModulesCommands.php
+11
-8
11 additions, 8 deletions
DevModulesCommands.php
with
11 additions
and
8 deletions
DevModulesCommands.php
+
11
−
8
View file @
11efcab1
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment