Skip to content

Commit 08d5d8f

Browse files
authored
Merge pull request #213 from phpcr/analysis-NAr7gv
Apply fixes from StyleCI
2 parents 78dd89c + 0634086 commit 08d5d8f

File tree

86 files changed

+214
-107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+214
-107
lines changed

spec/PHPCR/Shell/Event/ProfileInitEventSpec.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ public function let(
3030
OutputInterface $output
3131
) {
3232
$this->beConstructedWith(
33-
$profile, $input, $output
33+
$profile,
34+
$input,
35+
$output
3436
);
3537
}
3638

spec/PHPCR/Shell/Serializer/YamlEncoderSpec.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ public function it_is_initializable()
2424
public function it_should_encode_to_yaml()
2525
{
2626
$data = ['foobar' => 'barfoo', 'barfoo' => 'foobar'];
27-
$this->encode($data, 'yaml')->shouldReturn(<<<'EOT'
27+
$this->encode($data, 'yaml')->shouldReturn(
28+
<<<'EOT'
2829
foobar: barfoo
2930
barfoo: foobar
3031

3132
EOT
32-
);
33+
);
3334
}
3435

3536
public function is_should_decode_yaml()

src/PHPCR/Shell/Config/Profile.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ protected function validateDomain($domain)
4444
if (!array_key_exists($domain, $this->profile)) {
4545
throw new \InvalidArgumentException(sprintf(
4646
'Unknown profile domain "%s", can only use one of: %s',
47-
$domain, implode(', ', array_keys($this->profile))
47+
$domain,
48+
implode(', ', array_keys($this->profile))
4849
));
4950
}
5051
}
@@ -87,7 +88,8 @@ public function get($domain, $key = null)
8788
if (!isset($this->profile[$domain][$key])) {
8889
throw new \InvalidArgumentException(sprintf(
8990
'Unknown key "%s" for profile domain "%s"',
90-
$key, $domain
91+
$key,
92+
$domain
9193
));
9294
}
9395

src/PHPCR/Shell/Config/ProfileLoader.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ public function loadProfile(Profile $profile)
6969
$path = $this->getProfilePath($profile->getName());
7070

7171
if (!file_exists($path)) {
72-
throw new \InvalidArgumentException(sprintf('Profile "%s" does not exist, expected to find it in "%s"',
73-
$profile->getName(), $path
72+
throw new \InvalidArgumentException(sprintf(
73+
'Profile "%s" does not exist, expected to find it in "%s"',
74+
$profile->getName(),
75+
$path
7476
));
7577
}
7678

@@ -99,7 +101,8 @@ public function saveProfile(Profile $profile, $overwrite = false)
99101

100102
if (false === $overwrite && file_exists($path)) {
101103
throw new FileExistsException(sprintf(
102-
'Profile already exists at "%s"', $path
104+
'Profile already exists at "%s"',
105+
$path
103106
));
104107
}
105108

src/PHPCR/Shell/Console/Command/Phpcr/AccessControlPrivilegeListCommand.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ protected function configure()
2727
$this->setDescription('List the privileges of the repository or a specific node');
2828
$this->addArgument('absPath', InputArgument::OPTIONAL, 'Absolute path for node, optional.');
2929
$this->addOption('supported', null, InputOption::VALUE_NONE, 'List privileges supported by repository rather than current session.');
30-
$this->setHelp(<<<'HERE'
30+
$this->setHelp(
31+
<<<'HERE'
3132
NOTE: This command is not supported by Jackrabbit.
3233
3334
List the privileges of the current session or the node at the given path.
@@ -49,7 +50,7 @@ protected function configure()
4950
list the privileges held by the current session, but rather the privileges
5051
supported by the repository.
5152
HERE
52-
);
53+
);
5354

5455
$this->requiresDescriptor(RepositoryInterface::OPTION_ACCESS_CONTROL_SUPPORTED, true);
5556
}

src/PHPCR/Shell/Console/Command/Phpcr/LockInfoCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ protected function configure()
2525
$this->setName('lock:info');
2626
$this->setDescription('Show details of the lock that applies to the specified node path');
2727
$this->addArgument('path', InputArgument::REQUIRED, 'Path of locked node');
28-
$this->setHelp(<<<'HERE'
28+
$this->setHelp(
29+
<<<'HERE'
2930
Shows the details of the lock that applies to the node at the specified
3031
path.
3132

src/PHPCR/Shell/Console/Command/Phpcr/LockLockCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ protected function configure()
2929
$this->addOption('session-scoped', null, InputOption::VALUE_NONE, 'If given, this lock expires with the current session; if not it expires when explicitly or automatically unlocked for some other reason');
3030
$this->addOption('timeout', null, InputOption::VALUE_REQUIRED, 'Desired lock timeout in seconds (servers are free to ignore this value). If not used lock will not timeout');
3131
$this->addOption('owner-info', null, InputOption::VALUE_REQUIRED, ' string containing owner information supplied by the client; servers are free to ignore this value. If none is specified, the implementation chooses one (i.e. user name of current backend authentication credentials');
32-
$this->setHelp(<<<'HERE'
32+
$this->setHelp(
33+
<<<'HERE'
3334
Places a lock on the node at <info>path</info>.
3435
3536
If successful, the node is said to hold the lock.

src/PHPCR/Shell/Console/Command/Phpcr/LockRefreshCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ protected function configure()
2424
$this->setName('lock:refresh');
2525
$this->setDescription('Refresh the TTL of the lock of the node at the given path');
2626
$this->addArgument('path', InputArgument::REQUIRED, 'Path of node containing the lock to be refreshed');
27-
$this->setHelp(<<<'HERE'
27+
$this->setHelp(
28+
<<<'HERE'
2829
If this lock's time-to-live is governed by a timer, this command resets
2930
that timer so that the lock does not timeout and expire.
3031

src/PHPCR/Shell/Console/Command/Phpcr/LockTokenAddCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ protected function configure()
2424
$this->setName('lock:token:add');
2525
$this->setDescription('Add a lock token to the current session');
2626
$this->addArgument('lockToken', InputArgument::REQUIRED, 'Lock token');
27-
$this->setHelp(<<<'HERE'
27+
$this->setHelp(
28+
<<<'HERE'
2829
Adds the specified lock token to the current Session.
2930
3031
Holding a lock token makes the current Session the owner of the lock

src/PHPCR/Shell/Console/Command/Phpcr/LockTokenListCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ protected function configure()
2323
{
2424
$this->setName('lock:token:list');
2525
$this->setDescription('List a lock token to the current session');
26-
$this->setHelp(<<<'HERE'
26+
$this->setHelp(
27+
<<<'HERE'
2728
Show a list of previously registered tokens.
2829
2930
Displays all lock tokens currently held by the

src/PHPCR/Shell/Console/Command/Phpcr/LockTokenRemoveCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ protected function configure()
2424
$this->setName('lock:token:remove');
2525
$this->setDescription('Remove a lock token to the current session');
2626
$this->addArgument('lockToken', InputArgument::REQUIRED, 'Lock token');
27-
$this->setHelp(<<<'HERE'
27+
$this->setHelp(
28+
<<<'HERE'
2829
Removes the specified lock token from the current Session.
2930
HERE
3031
);

src/PHPCR/Shell/Console/Command/Phpcr/LockUnlockCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ protected function configure()
2424
$this->setName('lock:unlock');
2525
$this->setDescription('Unlock the node at the given path');
2626
$this->addArgument('path', InputArgument::REQUIRED, 'Path of node');
27-
$this->setHelp(<<<'HERE'
27+
$this->setHelp(
28+
<<<'HERE'
2829
Removes the lock on the node at path.
2930
3031
Also removes the properties jcr:lockOwner and jcr:lockIsDeep from that

src/PHPCR/Shell/Console/Command/Phpcr/NodeCloneCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ protected function configure()
2727
$this->addArgument('destPath', InputArgument::REQUIRED, 'Path to destination node');
2828
$this->addArgument('srcWorkspace', InputArgument::OPTIONAL, 'If specified, copy from this workspace');
2929
$this->addOption('remove-existing', null, InputOption::VALUE_NONE, 'Remove existing nodes');
30-
$this->setHelp(<<<'HERE'
30+
$this->setHelp(
31+
<<<'HERE'
3132
Clones the subgraph at the node <info>srcAbsPath</info> in
3233
<info>srcWorkspace</info> to the new location at <info>destAbsPath</info> in
3334
the current workspace.

src/PHPCR/Shell/Console/Command/Phpcr/NodeCopyCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ protected function configure()
2525
$this->addArgument('srcPath', InputArgument::REQUIRED, 'Path to source node');
2626
$this->addArgument('destPath', InputArgument::REQUIRED, 'Path to destination node');
2727
$this->addArgument('srcWorkspace', InputArgument::OPTIONAL, 'If specified, copy from this workspace');
28-
$this->setHelp(<<<'HERE'
28+
$this->setHelp(
29+
<<<'HERE'
2930
Copies a Node including its children to a new location to the given workspace.
3031
3132
This method copies the subgraph rooted at, and including, the node at

src/PHPCR/Shell/Console/Command/Phpcr/NodeCorrespondingCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ protected function configure()
2424
$this->setDescription('Show the path for the current nodes corresponding path in named workspace');
2525
$this->addArgument('path', InputArgument::REQUIRED, 'Path of node');
2626
$this->addArgument('workspaceName', InputArgument::REQUIRED, 'The name of the workspace');
27-
$this->setHelp(<<<'HERE'
27+
$this->setHelp(
28+
<<<'HERE'
2829
Returns the absolute path of the node in the specified workspace that
2930
corresponds to this node.
3031
HERE

src/PHPCR/Shell/Console/Command/Phpcr/NodeCreateCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ protected function configure()
2424
$this->setDescription('Create a node at the current path');
2525
$this->addArgument('path', InputArgument::REQUIRED, 'Path of node to create');
2626
$this->addArgument('primaryNodeTypeName', InputArgument::OPTIONAL, 'Optional name of primary node type to use');
27-
$this->setHelp(<<<'HERE'
27+
$this->setHelp(
28+
<<<'HERE'
2829
Creates a new node at the specified <info>path</info>
2930
3031
This is session-write method, meaning that the addition of the new node

src/PHPCR/Shell/Console/Command/Phpcr/NodeEditCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ protected function configure()
3131
$this->setDescription('Edit the given node in the EDITOR configured by the system');
3232
$this->addArgument('path', InputArgument::REQUIRED, 'Path of node');
3333
$this->addOption('type', null, InputOption::VALUE_REQUIRED, 'Optional type to use when creating new nodes', 'nt:unstructured');
34-
$this->setHelp(<<<'HERE'
34+
$this->setHelp(
35+
<<<'HERE'
3536
Edit or create a node at the given path using the default editor as defined by the EDITOR environment variable.
3637
3738
When you invoke the command a temporary file in YAML format will be created on the filesystem. This file will

src/PHPCR/Shell/Console/Command/Phpcr/NodeFileImportCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ protected function configure()
3535
$this->addOption('mime-type', null, InputOption::VALUE_REQUIRED, 'Mime type (optional, auto-detected)');
3636
$this->addOption('force', null, InputOption::VALUE_NONE, 'Force overwriting any existing node');
3737
$this->addOption('no-container', null, InputOption::VALUE_NONE, 'Do not wrap in a JCR nt:file, but write directly to the specified property');
38-
$this->setHelp(<<<'HERE'
38+
$this->setHelp(
39+
<<<'HERE'
3940
Import an external file into the repository.
4041
4142
The file will be imported as a node of built-in type <comment>nt:file</comment>.

src/PHPCR/Shell/Console/Command/Phpcr/NodeInfoCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ protected function configure()
2424
$this->setName('node:info');
2525
$this->setDescription('Show information about the current node');
2626
$this->addArgument('path', InputArgument::REQUIRED, 'Path of node');
27-
$this->setHelp(<<<'HERE'
27+
$this->setHelp(
28+
<<<'HERE'
2829
Show information about the node(s) at the given path:
2930
3031
PHPCRSH> node:info path/to/node

src/PHPCR/Shell/Console/Command/Phpcr/NodeLifecycleFollowCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ protected function configure()
2525
$this->setDescription('Causes the lifecycle state of this node to undergo the specified transition.');
2626
$this->addArgument('path', InputArgument::REQUIRED, 'Path of node');
2727
$this->addArgument('transition', InputArgument::REQUIRED, 'A state transition');
28-
$this->setHelp(<<<'HERE'
28+
$this->setHelp(
29+
<<<'HERE'
2930
Causes the lifecycle state of the current node to undergo the specified
3031
transition.
3132

src/PHPCR/Shell/Console/Command/Phpcr/NodeLifecycleListCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ protected function configure()
2424
$this->setName('node:lifecycle:list');
2525
$this->setDescription('Returns the list of valid state transitions for this node.');
2626
$this->addArgument('path', InputArgument::REQUIRED, 'Path of node');
27-
$this->setHelp(<<<'HERE'
27+
$this->setHelp(
28+
<<<'HERE'
2829
Returns the list of valid state transitions for this node.
2930
HERE
3031
);

src/PHPCR/Shell/Console/Command/Phpcr/NodeListCommand.php

+8-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ protected function configure()
4646
'Sort properties, one of: <comment>%s</comment>',
4747
implode('</comment>, <comment>', $this->sortOptions)
4848
), 'asc');
49-
$this->setHelp(<<<'HERE'
49+
$this->setHelp(
50+
<<<'HERE'
5051
List both or one of the children and properties of this node.
5152
5253
Multiple levels can be shown by using the <info>--level</info> option.
@@ -123,7 +124,8 @@ public function execute(InputInterface $input, OutputInterface $output)
123124
$this->renderNode($node, $table, [], $filter);
124125

125126
if ($table->getNumberOfRows() > 0) {
126-
$output->writeln(sprintf('<pathbold>%s</pathbold> [%s] > %s',
127+
$output->writeln(sprintf(
128+
'<pathbold>%s</pathbold> [%s] > %s',
127129
$node->getPath(),
128130
$node->getPrimaryNodeType()->getName(),
129131
implode(', ', $node->getPrimaryNodeType()->getDeclaredSupertypeNames())
@@ -133,11 +135,13 @@ public function execute(InputInterface $input, OutputInterface $output)
133135
}
134136

135137
if ($config['show_execution_time_list']) {
136-
$output->writeln(sprintf(
138+
$output->writeln(
139+
sprintf(
137140
'%s nodes, %s properties in set (%s sec)',
138141
$this->nbNodes,
139142
$this->nbProperties,
140-
number_format($this->time, $config['execution_time_expansion']))
143+
number_format($this->time, $config['execution_time_expansion'])
144+
)
141145
);
142146
}
143147

src/PHPCR/Shell/Console/Command/Phpcr/NodeMixinAddCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ protected function configure()
2424
$this->setDescription('Add the named mixin to the node (can include wildcards)');
2525
$this->addArgument('path', InputArgument::REQUIRED, 'Path of node');
2626
$this->addArgument('mixinName', InputArgument::REQUIRED, 'The name of the mixin node type to be added');
27-
$this->setHelp(<<<'HERE'
27+
$this->setHelp(
28+
<<<'HERE'
2829
Adds the mixin node type named <info>mixinName</info> to the node(s) inferred by the path.
2930
3031
If this node is already of type <info>mixinName</info> (either due to a previously

src/PHPCR/Shell/Console/Command/Phpcr/NodeMixinRemoveCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ protected function configure()
2424
$this->setDescription('Remove the named mixin to the current node');
2525
$this->addArgument('path', InputArgument::REQUIRED, 'Path of node (can include wildcards)');
2626
$this->addArgument('mixinName', InputArgument::REQUIRED, 'The name of the mixin node type to be removeed');
27-
$this->setHelp(<<<'HERE'
27+
$this->setHelp(
28+
<<<'HERE'
2829
Removes the specified mixin node type from this node and removes
2930
mixinName from this node's jcr:mixinTypes property.
3031

src/PHPCR/Shell/Console/Command/Phpcr/NodeMoveCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ protected function configure()
2424
$this->setDescription('Move a node in the current session');
2525
$this->addArgument('srcPath', InputArgument::REQUIRED, 'The root of the subgraph to be moved.');
2626
$this->addArgument('destPath', InputArgument::REQUIRED, 'The location to which the subgraph is to be moved');
27-
$this->setHelp(<<<'HERE'
27+
$this->setHelp(
28+
<<<'HERE'
2829
Moves the node at <info>srcPath</info> (and its entire subgraph) to the new
2930
location at <info>destPath</info>.
3031

src/PHPCR/Shell/Console/Command/Phpcr/NodeOrderBeforeCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ protected function configure()
2525
$this->addArgument('path', InputArgument::REQUIRED, 'Path of node');
2626
$this->addArgument('srcChildRelPath', InputArgument::REQUIRED, 'The relative path to the child node to be moved in the ordering');
2727
$this->addArgument('destChildRelPath', InputArgument::REQUIRED, 'The relative path to the child before which the node srcChildRelPath will be placed');
28-
$this->setHelp(<<<'HERE'
28+
$this->setHelp(
29+
<<<'HERE'
2930
This command is used to change the order of a child node relative to the current node.
3031
3132
For example, given that the node <pathbold>/foobar</pathbold> has the children <node>child2</node> and

src/PHPCR/Shell/Console/Command/Phpcr/NodePropertyRemoveCommand.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ protected function configure()
2424
$this->setName('node:property:remove');
2525
$this->setDescription('Remove the property at the given absolute path');
2626
$this->addArgument('absPath', InputArgument::REQUIRED, 'Absolute path to property');
27-
$this->setHelp(<<<'HERE'
27+
$this->setHelp(
28+
<<<'HERE'
2829
Remove the property from the current session at the given path
2930
HERE
3031
);
@@ -39,7 +40,8 @@ public function execute(InputInterface $input, OutputInterface $output)
3940
$property = $session->getProperty($absPath);
4041
} catch (PathNotFoundException $e) {
4142
throw new \Exception(sprintf(
42-
'Could not find a property at "%s"', $absPath
43+
'Could not find a property at "%s"',
44+
$absPath
4345
));
4446
}
4547

src/PHPCR/Shell/Console/Command/Phpcr/NodePropertySetCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ protected function configure()
2929
$this->addArgument('path', InputArgument::REQUIRED, 'Path of property - parent path can include wildcards');
3030
$this->addArgument('value', InputArgument::OPTIONAL, 'Value for named property');
3131
$this->addOption('type', null, InputOption::VALUE_REQUIRED, 'Type of named property');
32-
$this->setHelp(<<<'HERE'
32+
$this->setHelp(
33+
<<<'HERE'
3334
Defines or set a value for a property identified by its name.
3435
3536
PHPCRSH> node:property:set . propname "some value" --type="String"

src/PHPCR/Shell/Console/Command/Phpcr/NodePropertyShowCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ protected function configure()
2424
$this->setName('node:property:show');
2525
$this->setDescription('Show the property at the given path');
2626
$this->addArgument('path', InputArgument::REQUIRED, 'Path to property (can include wildcards)');
27-
$this->setHelp(<<<'HERE'
27+
$this->setHelp(
28+
<<<'HERE'
2829
Show the full value of a property at the given path
2930
HERE
3031
);

src/PHPCR/Shell/Console/Command/Phpcr/NodeReferencesCommand.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,16 @@ protected function configure()
2525
$this->setDescription('Returns all REFERENCE properties that refer to this node');
2626
$this->addArgument('path', InputArgument::REQUIRED, 'Path of node (can include wildcard)');
2727
$this->addArgument('name', InputArgument::OPTIONAL, 'Limit references to given name');
28-
$this->setHelp(<<<'HERE'
28+
$this->setHelp(
29+
<<<'HERE'
2930
This command returns all REFERENCE properties that refer to this node,
3031
have the specified name and that are accessible through the current
3132
Session.
3233
3334
If the <info>name</info> parameter is null then all referring REFERENCES are returned
3435
regardless of name.
3536
HERE
36-
);
37+
);
3738
}
3839

3940
public function execute(InputInterface $input, OutputInterface $output)

src/PHPCR/Shell/Console/Command/Phpcr/NodeRemoveCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ protected function configure()
2525
$this->setDescription('Remove the node at path (can include wildcards)');
2626
$this->addArgument('path', InputArgument::REQUIRED, 'Path of node');
2727
$this->addOption('shared', null, InputOption::VALUE_NONE, 'Remove nodes in shared set');
28-
$this->setHelp(<<<'HERE'
28+
$this->setHelp(
29+
<<<'HERE'
2930
Remove the node at the given path.
3031
3132
If the `--shared` option is specified then any nodes within this nodes

0 commit comments

Comments
 (0)