Skip to content

Commit

Permalink
Remove now unused WorkspaceFinder::findByPrefix()
Browse files Browse the repository at this point in the history
  • Loading branch information
bwaidelich committed Sep 19, 2023
1 parent c73d9e8 commit dcb1596
Showing 1 changed file with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,32 +91,6 @@ public function findOneByCurrentContentStreamId(
return $workspace;
}

/**
* @return array<string,Workspace>
*/
public function findByPrefix(WorkspaceName $prefix): array
{
$result = [];

$connection = $this->client->getConnection();
$workspaceRows = $connection->executeQuery(
'
SELECT * FROM ' . $this->tableName . '
WHERE workspaceName LIKE :workspaceNameLike
',
[
'workspaceNameLike' => $prefix->value . '%'
]
)->fetchAllAssociative();

foreach ($workspaceRows as $workspaceRow) {
$similarlyNamedWorkspace = $this->createWorkspaceFromDatabaseRow($workspaceRow);
$result[$similarlyNamedWorkspace->workspaceName->value] = $similarlyNamedWorkspace;
}

return $result;
}

/**
* @return array<string,Workspace>
* @throws \Doctrine\DBAL\DBALException
Expand Down

0 comments on commit dcb1596

Please sign in to comment.