refactor(employees): use array helper for siteIds in EmployeesIndexRequest
This commit is contained in:
parent
04c39e2573
commit
d55178407f
1 changed files with 4 additions and 6 deletions
|
|
@ -54,12 +54,10 @@ final class EmployeesIndexRequest extends FormRequest
|
|||
$service = $this->filled('serviceId') ? new ServiceId($this->string('serviceId')->value()) : null;
|
||||
|
||||
$sites = [];
|
||||
$rawSiteIds = $this->input('siteIds');
|
||||
if (is_array($rawSiteIds)) {
|
||||
foreach ($rawSiteIds as $s) {
|
||||
if (is_string($s) && $s !== '') {
|
||||
$sites[] = new SiteId($s);
|
||||
}
|
||||
$rawSiteIds = $this->array('siteIds');
|
||||
foreach ($rawSiteIds as $s) {
|
||||
if (is_string($s) && $s !== '') {
|
||||
$sites[] = new SiteId($s);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue