protected static function _closureDef($frame, $function) {
		$reference = '::';
		$frame += ['file' => '??', 'line' => '??'];
		$cacheKey = "{$frame['file']}@{$frame['line']}";

		if (isset(static::$_closureCache[$cacheKey])) {
			return static::$_closureCache[$cacheKey];
		}

		if ($class = Inspector::classes(['file' => $frame['file']])) {
			foreach (Inspector::methods(key($class), 'extents') as $method => $extents) {
				$line = $frame['line'];

				if (!($extents[0] <= $line && $line <= $extents[1])) {
					continue;
				}
				$class = key($class);
				$reference = "{$class}::{$method}";
				$function = "{$reference}()::{closure}";
				break;
			}
		} else {
			$reference = $frame['file'];
			$function = "{$reference}::{closure}";
		}
		$line = static::_definition($reference, $frame['line']) ?: '?';
		$function .= " @ {$line}";
		return static::$_closureCache[$cacheKey] = $function;
	}
protected static function _closureDef($frame, $function) {
		$reference = '::';
		$frame += ['file' => '??', 'line' => '??'];
		$cacheKey = "{$frame['file']}@{$frame['line']}";

		if (isset(static::$_closureCache[$cacheKey])) {
			return static::$_closureCache[$cacheKey];
		}

		if ($class = Inspector::classes(['file' => $frame['file']])) {
			foreach (Inspector::methods(key($class), 'extents') as $method => $extents) {
				$line = $frame['line'];

				if (!($extents[0] <= $line && $line <= $extents[1])) {
					continue;
				}
				$class = key($class);
				$reference = "{$class}::{$method}";
				$function = "{$reference}()::{closure}";
				break;
			}
		} else {
			$reference = $frame['file'];
			$function = "{$reference}::{closure}";
		}
		$line = static::_definition($reference, $frame['line']) ?: '?';
		$function .= " @ {$line}";
		return static::$_closureCache[$cacheKey] = $function;
	}
protected static function _closureDef ( $ frame , $ function ) { $ reference = '::' ; $ frame += [ 'file' => '??' , 'line' => '??' ] ; $ cacheKey = "{$frame['file']}@{$frame['line']}" ; if ( isset ( static :: $ _closureCache [ $ cacheKey ] ) ) { return static :: $ _closureCache [ $ cacheKey ] ; } if ( $ class = Inspector :: classes ( [ 'file' => $ frame [ 'file' ] ] ) ) { foreach ( Inspector :: methods ( key ( $ class ) , 'extents' ) as $ method => $ extents ) { $ line = $ frame [ 'line' ] ; if ( ! ( $ extents [ 0 ] <= $ line && $ line <= $ extents [ 1 ] ) ) { continue ; } $ class = key ( $ class ) ; $ reference = "{$class}::{$method}" ; $ function = "{$reference}()::{closure}" ; break ; } } else { $ reference = $ frame [ 'file' ] ; $ function = "{$reference}::{closure}" ; } $ line = static :: _definition ( $ reference , $ frame [ 'line' ] ) ? : '?' ; $ function .= " @ {$line}" ; return static :: $ _closureCache [ $ cacheKey ] = $ function ; }
Helper method for caching closure function references to help the process of building the
stack trace.

@param  array $frame Backtrace information.
@param  callable|string $function The method related to $frame information.
@return string Returns either the cached or the fetched closure function reference while
writing its reference to the cache array `$_closureCache`.
Helper method for caching closure function references to help the process of building the stack trace .