Removed unused vars/declarations, update PHPDoc.
Merge branch 'f-lock' of github.com:owncloud/core into f-lock