Skip to content

Commit 2166818

Browse files
authored
Merge pull request #191 from phpcr/analysis-bQyrO5
Apply fixes from StyleCI
2 parents a239bde + 6591f92 commit 2166818

23 files changed

+126
-62
lines changed

src/PHPCR/Util/CND/Parser/CndParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ protected function parsePropDef(NodeTypeTemplateInterface $nodeType)
369369
protected function parsePropertyType(PropertyDefinitionTemplateInterface $property)
370370
{
371371
$types = ['STRING', 'BINARY', 'LONG', 'DOUBLE', 'BOOLEAN', 'DATE', 'NAME', 'PATH',
372-
'REFERENCE', 'WEAKREFERENCE', 'DECIMAL', 'URI', 'UNDEFINED', '*', '?', ];
372+
'REFERENCE', 'WEAKREFERENCE', 'DECIMAL', 'URI', 'UNDEFINED', '*', '?', ];
373373

374374
if (!$this->checkTokenIn(Token::TK_IDENTIFIER, $types, true)) {
375375
throw new ParserException($this->tokenQueue, sprintf('Invalid property type: %s', $this->tokenQueue->get()->getData()));

src/PHPCR/Util/Console/Command/BaseNodeManipulationCommand.php

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,37 @@ abstract class BaseNodeManipulationCommand extends BaseCommand
1717
*/
1818
protected function configureNodeManipulationInput()
1919
{
20-
$this->addOption('set-prop', 'p',
20+
$this->addOption(
21+
'set-prop',
22+
'p',
2123
InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
2224
'Set node property on nodes use foo=bar'
2325
);
2426

25-
$this->addOption('remove-prop', 'r',
27+
$this->addOption(
28+
'remove-prop',
29+
'r',
2630
InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
2731
'Remove property from nodes'
2832
);
2933

30-
$this->addOption('add-mixin', null,
34+
$this->addOption(
35+
'add-mixin',
36+
null,
3137
InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
3238
'Add a mixin to the nodes'
3339
);
3440

35-
$this->addOption('remove-mixin', null,
41+
$this->addOption(
42+
'remove-mixin',
43+
null,
3644
InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
3745
'Remove mixin from the nodes'
3846
);
3947

40-
$this->addOption('apply-closure', null,
48+
$this->addOption(
49+
'apply-closure',
50+
null,
4151
InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY,
4252
'Apply a closure to each node, closures are passed PHPCR\Session and PHPCR\NodeInterface'
4353
);

src/PHPCR/Util/Console/Command/NodeDumpCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ protected function configure()
4040
->addOption('ref-format', 'uuid', InputOption::VALUE_REQUIRED, 'Set the way references should be displayed when dumping reference properties - either "uuid" (default) or "path"')
4141
->addArgument('identifier', InputArgument::OPTIONAL, 'Root path to dump', '/')
4242
->setDescription('Dump subtrees of the content repository')
43-
->setHelp(<<<'HERE'
43+
->setHelp(
44+
<<<'HERE'
4445
The <info>dump</info> command recursively outputs the name of the node specified
4546
by the <info>identifier</info> argument and its subnodes in a yaml-like style.
4647

src/PHPCR/Util/Console/Command/NodeMoveCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ protected function configure()
2929
->addArgument('source', InputArgument::REQUIRED, 'Path of node to move')
3030
->addArgument('destination', InputArgument::REQUIRED, 'Destination for node')
3131
->setDescription('Moves a node from one path to another')
32-
->setHelp(<<<'EOF'
32+
->setHelp(
33+
<<<'EOF'
3334
This command simply moves a node from one path (the source path)
3435
to another (the destination path), it can also be considered
3536
as a rename command.
@@ -55,7 +56,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
5556

5657
$output->writeln(sprintf(
5758
'<info>Moving </info>%s<info> to </info>%s',
58-
$sourcePath, $destPath
59+
$sourcePath,
60+
$destPath
5961
));
6062

6163
$session->move($sourcePath, $destPath);

src/PHPCR/Util/Console/Command/NodeRemoveCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ protected function configure()
3636
->addArgument('path', InputArgument::REQUIRED, 'Path of the node to purge')
3737
->addOption('force', null, InputOption::VALUE_NONE, 'Use to bypass the confirmation dialog')
3838
->addOption('only-children', null, InputOption::VALUE_NONE, 'Use to only purge children of specified path')
39-
->setHelp(<<<'EOF'
39+
->setHelp(
40+
<<<'EOF'
4041
The <info>phpcr:node:remove</info> command will remove the given node or the
4142
children of the given node according to the options given.
4243

src/PHPCR/Util/Console/Command/NodeTouchCommand.php

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,21 @@ protected function configure()
3939
'Path at which to create the new node'
4040
)
4141
->addOption(
42-
'type', 't',
42+
'type',
43+
't',
4344
InputOption::VALUE_OPTIONAL,
4445
'Node type, default nt:unstructured',
4546
'nt:unstructured'
4647
)
47-
->addOption('dump', 'd',
48+
->addOption(
49+
'dump',
50+
'd',
4851
InputOption::VALUE_NONE,
4952
'Dump a string reperesentation of the created / modified node.'
5053
)
5154
->setDescription('Create or modify a node')
52-
->setHelp(<<<'HERE'
55+
->setHelp(
56+
<<<'HERE'
5357
This command allows you to create or modify a node at the specified path.
5458
5559
For example::
@@ -65,7 +69,7 @@ protected function configure()
6569
6670
$ ./bin/phpcr phpcr:touch /foobar --type=my:nodetype --set-prop=bar=myvalue --remove-prop=foo --dump
6771
HERE
68-
);
72+
);
6973
}
7074

7175
/**
@@ -104,7 +108,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
104108
if ($nodeType != $type) {
105109
$output->writeln(sprintf(
106110
'<error>You have specified node type "%s" but the existing node is of type "%s"</error>',
107-
$type, $nodeType
111+
$type,
112+
$nodeType
108113
));
109114

110115
return 1;
@@ -125,7 +130,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
125130
}
126131

127132
$output->writeln(sprintf(
128-
'<info>Creating node: </info> %s [%s]', $path, $type
133+
'<info>Creating node: </info> %s [%s]',
134+
$path,
135+
$type
129136
));
130137

131138
$node = $parentNode->addNode($nodeName, $type);

src/PHPCR/Util/Console/Command/NodeTypeListCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ protected function configure()
2323
$this
2424
->setName('phpcr:node-type:list')
2525
->setDescription('List all available node types in the repository')
26-
->setHelp(<<<'EOT'
26+
->setHelp(
27+
<<<'EOT'
2728
This command lists all of the available node types and their subtypes
2829
in the PHPCR repository.
2930
EOT

src/PHPCR/Util/Console/Command/NodeTypeRegisterCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ protected function configure()
3636
->setDescription('Register node types in the PHPCR repository')
3737
->addArgument('cnd-file', InputArgument::IS_ARRAY, 'Register namespaces and node types from a "Compact Node Type Definition" .cnd file(s)')
3838
->addOption('allow-update', null, InputOption::VALUE_NONE, 'Overwrite existig node type')
39-
->setHelp(<<<'EOT'
39+
->setHelp(
40+
<<<'EOT'
4041
Register node types in the PHPCR repository.
4142
4243
This command allows to register node types in the repository that are defined

src/PHPCR/Util/Console/Command/NodesUpdateCommand.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,28 @@ protected function configure()
3333

3434
$this->setName('phpcr:nodes:update')
3535
->addOption(
36-
'query', null,
36+
'query',
37+
null,
3738
InputOption::VALUE_REQUIRED,
3839
'Query used to select the nodes'
3940
)
4041
->addOption(
41-
'query-language', 'l',
42+
'query-language',
43+
'l',
4244
InputOption::VALUE_OPTIONAL,
4345
'The query language (e.g. sql, jcr_sql2)',
4446
'jcr-sql2'
4547
)
4648
->addOption(
47-
'persist-counter', 'c',
49+
'persist-counter',
50+
'c',
4851
InputOption::VALUE_OPTIONAL,
4952
'Save the session every x requests',
5053
'100'
5154
)
5255
->setDescription('Command to manipulate the nodes in the workspace.')
53-
->setHelp(<<<HERE
56+
->setHelp(
57+
<<<HERE
5458
The <info>phpcr:nodes:update</info> can manipulate the properties of nodes
5559
found using the given query.
5660
@@ -77,7 +81,7 @@ protected function configure()
7781
For each node in the result set, the closure will be passed the current
7882
<comment>PHPCR\SessionInterface</comment> implementation and the node (<comment>PHPCR\NodeInterface</comment>) as <comment>\$session</comment> and <comment>\$node</comment>.
7983
HERE
80-
);
84+
);
8185
}
8286

8387
/**

src/PHPCR/Util/Console/Command/WorkspaceCreateCommand.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ protected function configure()
2727
->setName('phpcr:workspace:create')
2828
->addArgument('name', InputArgument::REQUIRED, 'Name of the workspace to create')
2929
->addOption(
30-
'ignore-existing',
31-
null,
32-
InputOption::VALUE_NONE,
33-
'If set, an existing workspace will return a success code'
30+
'ignore-existing',
31+
null,
32+
InputOption::VALUE_NONE,
33+
'If set, an existing workspace will return a success code'
3434
)
3535
->setDescription('Create a workspace in the configured repository')
36-
->setHelp(<<<'EOT'
36+
->setHelp(
37+
<<<'EOT'
3738
The <info>workspace:create</info> command creates a workspace with the specified name.
3839
It will fail if a workspace with that name already exists or if the repository implementation
3940
does not support the workspace creation operation.

0 commit comments

Comments
 (0)