Skip to content

Commit 5acbdfd

Browse files
committed
Use in_array check instead array_search
1 parent cfa0bc4 commit 5acbdfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
6060
return 1;
6161
}
6262

63-
if (false !== array_search($workspaceName, $workspace->getAccessibleWorkspaceNames())) {
63+
if (in_array($workspaceName, $workspace->getAccessibleWorkspaceNames())) {
6464
$output->writeln(
6565
sprintf('<comment>This repository already has a workspace called "%s"</comment>', $workspaceName)
6666
);

0 commit comments

Comments
 (0)