Occ app:check-code fails with PHP 7.1

I am trying to develop an app for Nextcloud. The documentation says that you should check your app with './occ app:check-code ’ and fix the errors before you publish it.
When I tried to run it, I got the error “[PhpParser\Error] Syntax error, unexpected ‘?’ on line 116”.
Further research showed me that the issue seems to be a method definition like this one: “protected function method(array $param): ?SomeInterface {…}”.
I have specified in the info.xml that the app requires PHP 7.1 minimum. The Cli-PHP is in version 7.1.13. Am i using the command wrong or does the command simply not support this return type declaration?

I guess the later. Return types are 7.0+ but the core code currently only supports 5.6 syntax, since that is the defined minimum of Nextcloud 12 and 13.

For 14 we raised the minimum version to 7.0 so we could update that.