private function getFunctionArgumentsNames($closure) : array
    {
        $result = [];

        $closureReflection = new ReflectionFunction($closure);

        foreach ($closureReflection->getParameters() as $param) {
            $result[] = $param->name;
        }

        return $result;
    }