Fix PHPdoc in lib/private

using scrutinizer patch
Fix PHPdoc in lib/public

using scrutinizer patch
Merge pull request #8222 from owncloud/type-hinting

Type hinting fixes