diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index efc9a42e5f59de2194468c0cea230e3bbdcbe7f7..c039928eadddd22dbc533943e69f01948f81daf3 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -201,13 +201,11 @@ class FilesPlugin extends ServerPlugin {
 
 		if ($sourceDir !== $destinationDir) {
 			$sourceNodeFileInfo = $sourceNode->getFileInfo();
-			if (is_null($sourceNodeFileInfo)) {
-				throw new NotFound($source . ' does not exist');
-			}
-
-			if (!$sourceNodeFileInfo->isDeletable()) {
+			if ($sourceNodeFileInfo !== null && !$sourceNodeFileInfo->isDeletable()) {
 				throw new Forbidden($source . " cannot be deleted");
 			}
+
+			throw new NotFound($source . ' does not exist');
 		}
 	}
 
diff --git a/core/ajax/update.php b/core/ajax/update.php
index d23e3b0d56d43696d188da99f97fc9f7a03cccca..818291d3eff4f0f5450f76f8592b22fe6acba1f2 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -50,6 +50,10 @@ class FeedBackHandler {
 	private $progressStateStep = 0;
 	/** @var string */
 	private $currentStep;
+	/** @var \OCP\IEventSource */
+	private $eventSource;
+	/** @var \OCP\IL10N */
+	private $l10n;
 
 	public function __construct(\OCP\IEventSource $eventSource, \OCP\IL10N $l10n) {
 		$this->eventSource = $eventSource;
@@ -220,7 +224,7 @@ if (OC::checkUpgrade(false)) {
 
 	if (!empty($disabledApps)) {
 		$eventSource->send('notice',
-			(string)$l->t('Following apps have been disabled: %s', implode(', ', $disabledApps)));
+			(string)$l->t('Following apps have been disabled: %s', [implode(', ', $disabledApps)]));
 	}
 } else {
 	$eventSource->send('notice', (string)$l->t('Already up to date'));
diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php
index 8227e69ef0660aafe60388d7e356a97592b610c1..a55e6f9e5b53d365681c711f7c185b8645c50cdd 100644
--- a/lib/private/Mail/EMailTemplate.php
+++ b/lib/private/Mail/EMailTemplate.php
@@ -365,7 +365,7 @@ EOF;
 	 * Adds a heading to the email
 	 *
 	 * @param string $title
-	 * @param string $plainTitle|bool Title that is used in the plain text email
+	 * @param string|bool $plainTitle Title that is used in the plain text email
 	 *   if empty the $title is used, if false none will be used
 	 */
 	public function addHeading($title, $plainTitle = '') {
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 5efbcfecf32c3fa0c7961cd3530ff386eb83cc7f..1f1570f3f468ad560db23bdd20e92dbfda82a8ed 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -1249,7 +1249,6 @@ class Server extends ServerContainer implements IServerContainer {
 	}
 
 	/**
-	 * @internal For internal use only
 	 * @return \OC\SystemConfig
 	 */
 	public function getSystemConfig() {
diff --git a/lib/public/Mail/IEMailTemplate.php b/lib/public/Mail/IEMailTemplate.php
index 6df83b4d10e81dd67e10a2c24a763eaf357574e8..6d0591b019b920527582daff1513a400cd94dbb4 100644
--- a/lib/public/Mail/IEMailTemplate.php
+++ b/lib/public/Mail/IEMailTemplate.php
@@ -62,7 +62,7 @@ interface IEMailTemplate {
 	 * Adds a heading to the email
 	 *
 	 * @param string $title
-	 * @param string $plainTitle|bool Title that is used in the plain text email
+	 * @param string|bool $plainTitle Title that is used in the plain text email
 	 *   if empty the $title is used, if false none will be used
 	 *
 	 * @since 12.0.0
diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php
index 76394fcb6c63e29c4f8a72055db5d85a82bfe15f..4b03cf91a1000d528332e5bef703cabe9f250549 100644
--- a/settings/Controller/UsersController.php
+++ b/settings/Controller/UsersController.php
@@ -45,7 +45,6 @@ use OCP\Files\Config\IUserMountCache;
 use OCP\Encryption\IEncryptionModule;
 use OCP\Encryption\IManager;
 use OCP\IConfig;
-use OCP\IGroupManager;
 use OCP\IL10N;
 use OCP\ILogger;
 use OCP\IRequest;
@@ -71,7 +70,7 @@ class UsersController extends Controller {
 	private $isAdmin;
 	/** @var IUserManager */
 	private $userManager;
-	/** @var IGroupManager */
+	/** @var \OC\Group\Manager */
 	private $groupManager;
 	/** @var IConfig */
 	private $config;
@@ -113,7 +112,7 @@ class UsersController extends Controller {
 	 * @param string $appName
 	 * @param IRequest $request
 	 * @param IUserManager $userManager
-	 * @param IGroupManager $groupManager
+	 * @param \OC\Group\Manager $groupManager
 	 * @param IUserSession $userSession
 	 * @param IConfig $config
 	 * @param bool $isAdmin
@@ -136,7 +135,7 @@ class UsersController extends Controller {
 	public function __construct($appName,
 								IRequest $request,
 								IUserManager $userManager,
-								IGroupManager $groupManager,
+								\OC\Group\Manager $groupManager,
 								IUserSession $userSession,
 								IConfig $config,
 								$isAdmin,
@@ -180,14 +179,14 @@ class UsersController extends Controller {
 		$this->isEncryptionAppEnabled = $appManager->isEnabledForUser('encryption');
 		if ($this->isEncryptionAppEnabled) {
 			// putting this directly in empty is possible in PHP 5.5+
-			$result = $config->getAppValue('encryption', 'recoveryAdminEnabled', 0);
+			$result = $config->getAppValue('encryption', 'recoveryAdminEnabled', '0');
 			$this->isRestoreEnabled = !empty($result);
 		}
 	}
 
 	/**
 	 * @param IUser $user
-	 * @param array $userGroups
+	 * @param array|null $userGroups
 	 * @return array
 	 */
 	private function formatUserForIndex(IUser $user, array $userGroups = null) {
diff --git a/settings/Hooks.php b/settings/Hooks.php
index 2cc5ce30bbe712b3462a7d109cd2466a5345ed9d..115f62a9a2ac2507c6fa1b98a275ae7502caa9e2 100644
--- a/settings/Hooks.php
+++ b/settings/Hooks.php
@@ -119,7 +119,7 @@ class Hooks {
 		if ($user->getEMailAddress() !== null) {
 			$template = $this->mailer->createEMailTemplate();
 			$template->addHeader();
-			$template->addHeading($this->l->t('Password changed for %s', $user->getDisplayName()), false);
+			$template->addHeading($this->l->t('Password changed for %s', [$user->getDisplayName()]), false);
 			$template->addBodyText($text . ' ' . $this->l->t('If you did not request this, please contact an administrator.'));
 			$template->addFooter();
 
@@ -185,10 +185,10 @@ class Hooks {
 		if ($oldMailAddress !== null) {
 			$template = $this->mailer->createEMailTemplate();
 			$template->addHeader();
-			$template->addHeading($this->l->t('Email address changed for %s', $user->getDisplayName()), false);
+			$template->addHeading($this->l->t('Email address changed for %s', [$user->getDisplayName()]), false);
 			$template->addBodyText($text . ' ' . $this->l->t('If you did not request this, please contact an administrator.'));
 			if ($user->getEMailAddress()) {
-				$template->addBodyText($this->l->t('The new email address is %s', $user->getEMailAddress()));
+				$template->addBodyText($this->l->t('The new email address is %s', [$user->getEMailAddress()]));
 			}
 			$template->addFooter();
 
diff --git a/status.php b/status.php
index 3d2d8f59d75cdd88009343a63321e9c226ee7ea3..293d843c6d69e072de30c2fcb410ffb6c273280d 100644
--- a/status.php
+++ b/status.php
@@ -56,5 +56,5 @@ try {
 
 } catch (Exception $ex) {
 	OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
-	\OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL);
+	\OC::$server->getLogger()->logException($ex, ['app' => 'remote']);
 }
diff --git a/tests/lib/Util/User/Dummy.php b/tests/lib/Util/User/Dummy.php
index ea47f5d7d15944ee160d5f01fadf519a475ecf42..806a97bacbaf066bfd0c64e79c45e5298de1f349 100644
--- a/tests/lib/Util/User/Dummy.php
+++ b/tests/lib/Util/User/Dummy.php
@@ -95,7 +95,7 @@ class Dummy extends Backend implements \OCP\IUserBackend {
 	 *
 	 * @param string $uid The username
 	 * @param string $password The password
-	 * @return string
+	 * @return string|bool
 	 *
 	 * Check if the password is correct without logging in the user
 	 * returns the user id or false
@@ -103,9 +103,9 @@ class Dummy extends Backend implements \OCP\IUserBackend {
 	public function checkPassword($uid, $password) {
 		if (isset($this->users[$uid]) && $this->users[$uid] === $password) {
 			return $uid;
-		} else {
-			return false;
 		}
+
+		return false;
 	}
 
 	/**