Skip to content

Commit

Permalink
style: Run composer run cs:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zak39 committed Sep 9, 2024
1 parent e2b0a63 commit cd9faff
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions lib/Controller/WorkspaceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public function createWorkspace(string $spaceName,
throw new BadRequestException('spaceName must be provided');
}

if($this->workspaceCheck->containSpecialChar($spaceName)) {
throw new BadRequestException('Your Workspace name must not contain the following characters: ' . implode(" ", str_split(WorkspaceCheckService::CHARACTERS_SPECIAL)));
if ($this->workspaceCheck->containSpecialChar($spaceName)) {
throw new BadRequestException('Your Workspace name must not contain the following characters: ' . implode(' ', str_split(WorkspaceCheckService::CHARACTERS_SPECIAL)));
}

if ($this->workspaceCheck->isExist($spaceName)) {
Expand Down Expand Up @@ -197,22 +197,22 @@ public function findAll(): JSONResponse {

$gids = array_keys($space['groups'] ?? []);

$groups = [];
$groups = [];

foreach ($gids as $gid) {
$group = $this->groupManager->get($gid);
foreach ($gids as $gid) {
$group = $this->groupManager->get($gid);

if (is_null($group)) {
$this->logger->warning(
"Be careful, the $gid group is not exist in the oc_groups table."
. " But, it's present in the oc_group_folders_groups table."
. "It necessary to recreate it with the occ command."
);
continue;
}
if (is_null($group)) {
$this->logger->warning(
"Be careful, the $gid group is not exist in the oc_groups table."
. " But, it's present in the oc_group_folders_groups table."
. 'It necessary to recreate it with the occ command.'
);
continue;
}

$groups[] = $group;
}
$groups[] = $group;
}

$space['groups'] = GroupFormatter::formatGroups($groups);
$space['users'] = $this->workspaceService->addUsersInfo($space);
Expand Down Expand Up @@ -320,7 +320,7 @@ public function renameSpace(array|string $workspace,
}

if ($this->workspaceCheck->containSpecialChar($newSpaceName)) {
throw new BadRequestException('Your Workspace name must not contain the following characters: ' . implode(" ", str_split(WorkspaceCheckService::CHARACTERS_SPECIAL)));
throw new BadRequestException('Your Workspace name must not contain the following characters: ' . implode(' ', str_split(WorkspaceCheckService::CHARACTERS_SPECIAL)));
}

if ($newSpaceName === false ||
Expand Down

0 comments on commit cd9faff

Please sign in to comment.