I am not sure how to increase my email_actions in this snippet:
$email_actions = 0;
array_walk(
$steps,
fn($step): int => !empty($step['settings']['type']) &&
$step['settings']['type'] === self::FLOWS_EMAIL_TYPE_ACTION
? $email_actions++
: false
);
dd($email_actions);
I get 0 as result when it should be 2. Tried to pass the variable by reference like:
fn($step, &$email_actions) but is obviously not the right approach.