Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comma Separated String of IDs used as an Array #482

Open
ThomasAFink opened this issue Jul 4, 2024 · 0 comments
Open

Comma Separated String of IDs used as an Array #482

ThomasAFink opened this issue Jul 4, 2024 · 0 comments

Comments

@ThomasAFink
Copy link
Member

ThomasAFink commented Jul 4, 2024

The variable $excludedIds is used to hold IDs that are excluded from the appointment roll call by the clerk. Currently, this variable is being handled as a comma-separated string, which is then split into an array using the explode function. This approach can lead to potential issues and reduced code clarity. $excludedIds should probably just be an array of ids and not a comma separated string.

In the getNextProcess method:

$excludedIds = (0 < $queueList->count()) ? $excludedIds : '';

should be refactored to ensure $excludedIds is always an array.

In the WorkstationProcessPreCall class:

$excludedIds = $validator->getParameter('exclude')->isString()->setDefault('')->getValue();
if ($excludedIds) {
    $exclude = explode(',', $excludedIds);
}
$exclude[] = $process->toQueue(\App::$now)->number;

should be refactored to handle $excludedIds as an array directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant