Last active
May 25, 2021 08:25
-
-
Save martindilling/2a053193c42cc061c28eef069010ff4c to your computer and use it in GitHub Desktop.
Sometimes you find crazy things
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$value = function (string $field, $default = null) use ($input_data, $notification, $user_setup) { | |
$from_attr = substr($field, 0, 1) === '!'; | |
$val = $from_attr ? $user_setup->get(substr($field, 1), array_get($input_data, substr($field, 1), $default)) : $val = array_get($input_data, $field, $default); | |
return htmlentities(substr($val, 0, 1) === '@' ? $notification->payload->get(substr($val, 1), $default) : $val); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment