As pointed out by @kugel- on IRC some functions show scope "unknown" when the cursor is inside them, but they would be expected to show the function name, eg `document_open_file()`
I found it seems to be if the function declaration is more than one line, the scope shows "unknown" when the cursor is in the function body, change the declaration to one line and the scope shows correctly.