|
18 | 18 | */
|
19 | 19 | class WorkspaceImportCommand extends BaseCommand
|
20 | 20 | {
|
21 |
| - private static $uuidBehavior = array( |
| 21 | + const UUID_BEHAVIOR = [ |
22 | 22 | 'new' => ImportUUIDBehaviorInterface::IMPORT_UUID_CREATE_NEW,
|
23 | 23 | 'remove' => ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_REMOVE_EXISTING,
|
24 | 24 | 'replace' => ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_REPLACE_EXISTING,
|
25 | 25 | 'throw' => ImportUUIDBehaviorInterface::IMPORT_UUID_COLLISION_THROW,
|
26 |
| - ); |
| 26 | + ]; |
27 | 27 |
|
28 | 28 | /**
|
29 | 29 | * {@inheritDoc}
|
@@ -80,14 +80,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
|
80 | 80 | }
|
81 | 81 |
|
82 | 82 | $uuidBehavior = $input->getOption('uuid-behavior');
|
83 |
| - if (!array_key_exists($uuidBehavior, self::$uuidBehavior)) { |
| 83 | + if (!array_key_exists($uuidBehavior, self::UUID_BEHAVIOR)) { |
84 | 84 | $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)))); |
86 | 86 |
|
87 | 87 | return 1;
|
88 | 88 | }
|
89 | 89 |
|
90 |
| - $session->importXML($parentPath, $filename, self::$uuidBehavior[$uuidBehavior]); |
| 90 | + $session->importXML($parentPath, $filename, self::UUID_BEHAVIOR[$uuidBehavior]); |
91 | 91 | $session->save();
|
92 | 92 |
|
93 | 93 | $output->writeln(sprintf(
|
|
0 commit comments