You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The if is needed to ensure that $hasEmpty is only set to true once.
This can be simplified with a boolean true value:
$hasEmpty = valBoolTrue(); // Starts off as falseforeach($itemsas$item) {
$hasEmpty->set(empty($item)); // Will stay true if set to true once
}
Once the value has been set to true, it will stay true, even if set to false afterwards.
The sister function is valBoolFalse() works in the exact opposite way.
New here?
Have a look at the overview for a list of all helper classes available in the package.
Table of contents
Find the current page in the collapsible "Pages" list above, and expand the page, to view a table of contents.