- Added a trailing comma after the last array element
- Simplified the min/max logic
- Used
empty()instead of checking bothisset()andnullcomparison - Assigned and checked the transient value in one conditional
empty() instead of checking both isset() and null comparison