-
-
Save rightfold/5245df9cb5f5eb726215 to your computer and use it in GitHub Desktop.
This file contains 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 | |
function compose($f, $g) { | |
return function() use($f, $g) { | |
return $f(call_user_func_array($g, func_get_args())); | |
}; | |
} | |
function ctor($class) { | |
$reflect = new \ReflectionClass($class); | |
return function() use($reflect) { | |
return $reflect->newInstanceArgs(func_get_args()); | |
}; | |
} | |
$scopeParentID = mapNullable($request->query->get('scope-parent'), | |
compose(ctor('NodeID'), 'intval')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment