PHP type hinting does not support scalar types like strings, integers, booleans, etc. It only current supports objects (by specifying the name of the class in the function prototype), interfaces, arrays (since PHP 5.1) or callable (since PHP 5.4).
So in your example PHP thinks you are expecting an object that is from, or inherits from, or implements an interface called "string" which is not what you're trying to do.