Skip to content

Commit 9c3a019

Browse files
changed static variable to const
1 parent 2a8ee9a commit 9c3a019

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
*/
1919
class WorkspaceImportCommand extends BaseCommand
2020
{
21-
private static $uuidBehavior = array(
21+
const UUID_BEHAVIOR = [
2222
'new' => ImportUUIDBehaviorInterface::IMPORT_UUID_CREATE_NEW,
2323
'remove' => ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_REMOVE_EXISTING,
2424
'replace' => ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_REPLACE_EXISTING,
2525
'throw' => ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_THROW,
26-
);
26+
];
2727

2828
/**
2929
* {@inheritDoc}
@@ -80,14 +80,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
8080
}
8181

8282
$uuidBehavior = $input->getOption('uuid-behavior');
83-
if (!array_key_exists($uuidBehavior, self::$uuidBehavior)) {
83+
if (!array_key_exists($uuidBehavior, self::UUID_BEHAVIOR)) {
8484
$output->writeln(sprintf('<error>UUID-Behavior "%s" is not supported</error>', $uuidBehavior));
85-
$output->writeln(sprintf('Supported behaviors are %s', implode(', ', array_keys(self::$uuidBehavior))));
85+
$output->writeln(sprintf('Supported behaviors are %s', implode(', ', array_keys(self::UUID_BEHAVIOR))));
8686

8787
return 1;
8888
}
8989

90-
$session->importXML($parentPath, $filename, self::$uuidBehavior[$uuidBehavior]);
90+
$session->importXML($parentPath, $filename, self::UUID_BEHAVIOR[$uuidBehavior]);
9191
$session->save();
9292

9393
$output->writeln(sprintf(

0 commit comments

Comments
 (0)