src/Graviton/DocumentBundle/DependencyInjection/Compiler/Utils/DocumentMap.php
private function getFlatFieldCheckCallback($field, callable $callback = null)
    {
        if (!is_callable($callback)) {
            return true;
        }

        return call_user_func($callback, $field);
    }
private function getFlatFieldCheckCallback($field, callable $callback = null)
    {
        if (!is_callable($callback)) {
            return true;
        }

        return call_user_func($callback, $field);
    }
private function getFlatFieldCheckCallback ( $ field , callable $ callback = null ) { if ( ! is_callable ( $ callback ) ) { return true ; } return call_user_func ( $ callback , $ field ) ; }
Simple function to check whether a given shall be returned in the output of getFieldNamesFlat
and the optional given callback there.

@param AbstractField $field    field
@param callable|null $callback optional callback

@return bool|mixed true if field should be returned, false otherwise
Simple function to check whether a given shall be returned in the output of getFieldNamesFlat and the optional given callback there .