diff --git a/core/modules/update/src/Tests/UpdateTestBase.php b/core/modules/update/src/Tests/UpdateTestBase.php
index faec496..5fe09bb 100644
--- a/core/modules/update/src/Tests/UpdateTestBase.php
+++ b/core/modules/update/src/Tests/UpdateTestBase.php
@@ -56,16 +56,16 @@ protected function setUp() {
   /**
    * Refreshes the update status based on the desired available update scenario.
    *
-   * @param $xml_map
+   * @param array $xml_map
    *   Array that maps project names to availability scenarios to fetch. The key
    *   '#all' is used if a project-specific mapping is not defined.
-   * @param $url
+   * @param string $url
    *   (optional) A string containing the URL to fetch update data from.
    *   Defaults to 'update-test'.
    *
    * @see Drupal\update_test\Controller\UpdateTestController::updateTest()
    */
-  protected function refreshUpdateStatus($xml_map, $url = 'update-test') {
+  protected function refreshUpdateStatus(array $xml_map, $url = 'update-test') {
     // Tell the Update Manager module to fetch from the URL provided by
     // update_test module.
     $this->config('update.settings')->set('fetch.url', Url::fromUri('base:' . $url, array('absolute' => TRUE))->toString())->save();
diff --git a/core/modules/update/src/UpdateFetcher.php b/core/modules/update/src/UpdateFetcher.php
index 118d3a9..88896d9 100644
--- a/core/modules/update/src/UpdateFetcher.php
+++ b/core/modules/update/src/UpdateFetcher.php
@@ -32,7 +32,7 @@ class UpdateFetcher implements UpdateFetcherInterface {
   protected $fetchUrl;
 
   /**
-   * The update settings
+   * The update settings.
    *
    * @var \Drupal\Core\Config\Config
    */
@@ -109,7 +109,7 @@ public function buildFetchUrl(array $project, $site_key = '') {
   /**
    * {@inheritdoc}
    */
-  public function getFetchBaseUrl($project) {
+  public function getFetchBaseUrl(array $project) {
     if (isset($project['info']['project status url'])) {
       $url = $project['info']['project status url'];
     }
diff --git a/core/modules/update/src/UpdateFetcherInterface.php b/core/modules/update/src/UpdateFetcherInterface.php
index 461a4c8..e936621 100644
--- a/core/modules/update/src/UpdateFetcherInterface.php
+++ b/core/modules/update/src/UpdateFetcherInterface.php
@@ -23,7 +23,7 @@
    *   not include the path elements to specify a particular project, version,
    *   site_key, etc.
    */
-  public function getFetchBaseUrl($project);
+  public function getFetchBaseUrl(array $project);
 
   /**
    * Retrieves the project information.
diff --git a/core/modules/update/src/UpdateManager.php b/core/modules/update/src/UpdateManager.php
index 007b040..fdab65a 100644
--- a/core/modules/update/src/UpdateManager.php
+++ b/core/modules/update/src/UpdateManager.php
@@ -186,7 +186,7 @@ public function projectStorage($key) {
   /**
    * {@inheritdoc}
    */
-  public function fetchDataBatch(&$context) {
+  public function fetchDataBatch(array &$context) {
     if (empty($context['sandbox']['max'])) {
       $context['finished'] = 0;
       $context['sandbox']['max'] = $this->updateProcessor->numberOfQueueItems();
diff --git a/core/modules/update/src/UpdateManagerInterface.php b/core/modules/update/src/UpdateManagerInterface.php
index c011bae..3896559 100644
--- a/core/modules/update/src/UpdateManagerInterface.php
+++ b/core/modules/update/src/UpdateManagerInterface.php
@@ -64,7 +64,7 @@ public function getProjects();
    * @param array $context
    *   Reference to an array used for Batch API storage.
    */
-  public function fetchDataBatch(&$context);
+  public function fetchDataBatch(array &$context);
 
   /**
    * Clears out all the available update data and initiates re-fetching.
diff --git a/core/modules/update/src/UpdateProcessor.php b/core/modules/update/src/UpdateProcessor.php
index b5cf745..38b2f6e 100644
--- a/core/modules/update/src/UpdateProcessor.php
+++ b/core/modules/update/src/UpdateProcessor.php
@@ -115,7 +115,7 @@ public function __construct(ConfigFactoryInterface $config_factory, QueueFactory
   /**
    * {@inheritdoc}
    */
-  public function createFetchTask($project) {
+  public function createFetchTask(array $project) {
     if (empty($this->fetchTasks)) {
       $this->fetchTasks = $this->fetchTaskStore->getAll();
     }
@@ -140,7 +140,7 @@ public function fetchData() {
   /**
    * {@inheritdoc}
    */
-  public function processFetchTask($project) {
+  public function processFetchTask(array $project) {
     global $base_url;
 
     // This can be in the middle of a long-running batch, so REQUEST_TIME won't
@@ -266,7 +266,7 @@ public function claimQueueItem() {
   /**
    * {@inheritdoc}
    */
-  public function deleteQueueItem($item) {
+  public function deleteQueueItem(\stdClass $item) {
     return $this->fetchQueue->deleteItem($item);
   }
 
diff --git a/core/modules/update/src/UpdateProcessorInterface.php b/core/modules/update/src/UpdateProcessorInterface.php
index e2139c6..138f7cb 100644
--- a/core/modules/update/src/UpdateProcessorInterface.php
+++ b/core/modules/update/src/UpdateProcessorInterface.php
@@ -47,7 +47,7 @@ public function fetchData();
    * @see \Drupal\update\UpdateProcessor::fetchData()
    * @see \Drupal\update\UpdateProcessor::processFetchTask()
    */
-  public function createFetchTask($project);
+  public function createFetchTask(array $project);
 
   /**
    * Processes a task to fetch available update data for a single project.
@@ -61,7 +61,7 @@ public function createFetchTask($project);
    * @return bool
    *   TRUE if we fetched parsable XML, otherwise FALSE.
    */
-  public function processFetchTask($project);
+  public function processFetchTask(array $project);
 
   /**
    * Retrieves the number of items in the update fetch queue.
@@ -81,5 +81,5 @@ public function numberOfQueueItems();
    *
    * @see \Drupal\Core\Queue\QueueInterface::deleteItem()
    */
-  public function deleteQueueItem($item);
+  public function deleteQueueItem(\stdClass $item);
 }
diff --git a/core/modules/update/tests/modules/update_test/update_test.module b/core/modules/update/tests/modules/update_test/update_test.module
index f8de3cd..ac78780 100644
--- a/core/modules/update/tests/modules/update_test/update_test.module
+++ b/core/modules/update/tests/modules/update_test/update_test.module
@@ -7,6 +7,10 @@
  * Module for testing Update Manager functionality.
  */
 
+use Drupal\Core\Extension\Extension;
+use Symfony\Component\HttpFoundation\Response;
+use Symfony\Component\HttpFoundation\BinaryFileResponse;
+
 /**
  * Implements hook_system_info_alter().
  *
@@ -56,6 +60,56 @@ function update_test_update_status_alter(&$projects) {
 }
 
 /**
+ * Page callback: Prints mock XML for the Update Manager module.
+ *
+ * The specific XML file to print depends on two things: the project we're
+ * trying to fetch data for, and the desired "availability scenario" for that
+ * project which we're trying to test. Before attempting to fetch this data (by
+ * checking for updates on the available updates report), callers need to define
+ * the 'update_test_xml_map' variable as an array, keyed by project name,
+ * indicating which availability scenario to use for that project.
+ *
+ * @param string $project_name
+ *   The project short name the update manager is trying to fetch data for (the
+ *   fetch URLs are of the form: [base_url]/[project_name]/[core_version]).
+ *
+ * @return BinaryFileResponse|Response
+ *   A BinaryFileResponse object containing the content of the XML release file
+ *   for the specified project if one is available; a Response object with no
+ *   content otherwise.
+ *
+ * @see update_test_menu()
+ *
+ * @deprecated \Drupal\update_test\Controller\UpdateTestController::updateTest()
+ */
+function update_test_mock_page($project_name) {
+  $xml_map = \Drupal::config('update_test.settings')->get('xml_map');
+  if (isset($xml_map[$project_name])) {
+    $availability_scenario = $xml_map[$project_name];
+  }
+  elseif (isset($xml_map['#all'])) {
+    $availability_scenario = $xml_map['#all'];
+  }
+  else {
+    // The test didn't specify (for example, the webroot has other modules and
+    // themes installed but they're disabled by the version of the site
+    // running the test. So, we default to a file we know won't exist, so at
+    // least we'll get an empty xml response instead of a bunch of Drupal page
+    // output.
+    $availability_scenario = '#broken#';
+  }
+
+  $path = drupal_get_path('module', 'update_test');
+  $file = "$path/$project_name.$availability_scenario.xml";
+  $headers = array('Content-Type' => 'text/xml; charset=utf-8');
+  if (!is_file($file)) {
+    // Return an empty response.
+    return new Response('', 200, $headers);
+  }
+  return new BinaryFileResponse($file, 200, $headers);
+}
+
+/**
  * Implements hook_filetransfer_info().
  */
 function update_test_filetransfer_info() {
diff --git a/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php b/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php
index 7c1e17c..cd92be9 100644
--- a/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php
+++ b/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php
@@ -16,6 +16,9 @@
  */
 class UpdateLocalTasksTest extends LocalTaskIntegrationTestBase {
 
+  /**
+   * {@inheritdoc}
+   */
   protected function setUp() {
     $this->directoryList = array('update' => 'core/modules/update');
     parent::setUp();
diff --git a/core/modules/update/tests/src/Unit/UpdateFetcherTest.php b/core/modules/update/tests/src/Unit/UpdateFetcherTest.php
index 292f3f8..055dd8e 100644
--- a/core/modules/update/tests/src/Unit/UpdateFetcherTest.php
+++ b/core/modules/update/tests/src/Unit/UpdateFetcherTest.php
@@ -46,7 +46,7 @@ protected function setUp() {
    * @param string $site_key
    *   A string to mimic an anonymous site key hash.
    * @param string $expected
-   *   The expected url returned from UpdateFetcher::buildFetchUrl()
+   *   The expected url returned from UpdateFetcher::buildFetchUrl().
    *
    * @dataProvider providerTestUpdateBuildFetchUrl
    *
diff --git a/core/modules/update/update.api.php b/core/modules/update/update.api.php
index 362c1a2..92cabeb 100644
--- a/core/modules/update/update.api.php
+++ b/core/modules/update/update.api.php
@@ -23,7 +23,7 @@
  * report. In rare cases, a module might want to alter the data associated with
  * a project already in the list.
  *
- * @param $projects
+ * @param array $projects
  *   Reference to an array of the projects installed on the system. This
  *   includes all the metadata documented in the comments below for each project
  *   (either module or theme) that is currently enabled. The array is initially
@@ -34,7 +34,7 @@
  * @see \Drupal\Update\UpdateManager::getProjects()
  * @see \Drupal\Core\Utility\ProjectInfo->processInfoList()
  */
-function hook_update_projects_alter(&$projects) {
+function hook_update_projects_alter(array &$projects) {
   // Hide a site-specific module from the list.
   unset($projects['site_specific_module']);
 
@@ -76,13 +76,13 @@ function hook_update_projects_alter(&$projects) {
 /**
  * Alter the information about available updates for projects.
  *
- * @param $projects
+ * @param array $projects
  *   Reference to an array of information about available updates to each
  *   project installed on the system.
  *
  * @see update_calculate_project_data()
  */
-function hook_update_status_alter(&$projects) {
+function hook_update_status_alter(array &$projects) {
   $settings = \Drupal::config('update_advanced.settings')->get('projects');
   foreach ($projects as $project => $project_info) {
     if (isset($settings[$project]) && isset($settings[$project]['check']) &&
@@ -112,7 +112,7 @@ function hook_update_status_alter(&$projects) {
  * @param string $directory
  *   The directory that the archive was extracted into.
  *
- * @return
+ * @return array
  *   If there are any problems, return an array of error messages. If there are
  *   no problems, return an empty array.
  *
diff --git a/core/modules/update/update.authorize.inc b/core/modules/update/update.authorize.inc
index b96c904..0662ea9 100644
--- a/core/modules/update/update.authorize.inc
+++ b/core/modules/update/update.authorize.inc
@@ -19,10 +19,10 @@
  * Callback for system_authorized_init() in
  * update_manager_update_ready_form_submit().
  *
- * @param $filetransfer
+ * @param \Drupal\Core\FileTransfer $filetransfer
  *   The FileTransfer object created by authorize.php for use during this
  *   operation.
- * @param $projects
+ * @param array $projects
  *   A nested array of projects to install into the live webroot, keyed by
  *   project name. Each subarray contains the following keys:
  *   - project: The canonical project short name.
@@ -35,7 +35,7 @@
  *   an instance of \Symfony\Component\HttpFoundation\Response the calling code
  *   should use that response for the current page request.
  */
-function update_authorize_run_update($filetransfer, $projects) {
+function update_authorize_run_update(FileTransfer $filetransfer, array $projects) {
   $operations = array();
   foreach ($projects as $project_info) {
     $operations[] = array(
@@ -72,7 +72,7 @@ function update_authorize_run_update($filetransfer, $projects) {
  * Callback for system_authorized_init() in
  * update_manager_install_form_submit().
  *
- * @param FileTransfer $filetransfer
+ * @param \Drupal\Core\FileTransfer $filetransfer
  *   The FileTransfer object created by authorize.php for use during this
  *   operation.
  * @param string $project
@@ -90,7 +90,7 @@ function update_authorize_run_update($filetransfer, $projects) {
  *   an instance of \Symfony\Component\HttpFoundation\Response the calling code
  *   should use that response for the current page request.
  */
-function update_authorize_run_install($filetransfer, $project, $updater_name, $local_url) {
+function update_authorize_run_install(FileTransfer $filetransfer, $project, $updater_name, $local_url) {
   $operations[] = array(
     'update_authorize_batch_copy_project',
     array(
@@ -133,12 +133,12 @@ function update_authorize_run_install($filetransfer, $project, $updater_name, $l
  * @param string $local_url
  *   The URL to the locally installed temp directory where the project has
  *   already been downloaded and extracted into.
- * @param FileTransfer $filetransfer
+ * @param \Drupal\Core\FileTransfer $filetransfer
  *   The FileTransfer object to use for performing this operation.
  * @param array $context
  *   Reference to an array used for Batch API storage.
  */
-function update_authorize_batch_copy_project($project, $updater_name, $local_url, $filetransfer, &$context) {
+function update_authorize_batch_copy_project($project, $updater_name, $local_url, FileTransfer $filetransfer, array &$context) {
 
   // Initialize some variables in the Batch API $context array.
   if (!isset($context['results']['log'])) {
@@ -201,12 +201,12 @@ function update_authorize_batch_copy_project($project, $updater_name, $local_url
  * authorize.php will render a report. Also responsible for putting the site
  * back online and clearing the update status storage after a successful update.
  *
- * @param $success
+ * @param bool $success
  *   TRUE if the batch operation was successful; FALSE if there were errors.
- * @param $results
+ * @param array $results
  *   An associative array of results from the batch operation.
  */
-function update_authorize_update_batch_finished($success, $results) {
+function update_authorize_update_batch_finished($success, array $results) {
   foreach ($results['log'] as $messages) {
     if (!empty($messages['#abort'])) {
       $success = FALSE;
@@ -282,12 +282,12 @@ function update_authorize_update_batch_finished($success, $results) {
  * authorize.php will render a report. Also responsible for putting the site
  * back online after a successful install if necessary.
  *
- * @param $success
+ * @param bool $success
  *   TRUE if the batch operation was a success; FALSE if there were errors.
- * @param $results
+ * @param array $results
  *   An associative array of results from the batch operation.
  */
-function update_authorize_install_batch_finished($success, $results) {
+function update_authorize_install_batch_finished($success, array $results) {
   foreach ($results['log'] as $messages) {
     if (!empty($messages['#abort'])) {
       $success = FALSE;
@@ -345,7 +345,7 @@ function update_authorize_install_batch_finished($success, $results) {
  *   (optional) TRUE if the operation the message is about was a success, FALSE
  *   if there were errors. Defaults to TRUE.
  */
-function _update_batch_create_message(&$project_results, $message, $success = TRUE) {
+function _update_batch_create_message(array &$project_results, $message, $success = TRUE) {
   $project_results[] = array('message' => $message, 'success' => $success);
 }
 
diff --git a/core/modules/update/update.compare.inc b/core/modules/update/update.compare.inc
index a077c38..7450104 100644
--- a/core/modules/update/update.compare.inc
+++ b/core/modules/update/update.compare.inc
@@ -12,11 +12,11 @@
  * installed versions, and other information that is required before we can
  * compare against the available releases to produce the status report.
  *
- * @param $projects
+ * @param array $projects
  *   Array of project information from
  *   \Drupal\Update\UpdateManager::getProjects().
  */
-function update_process_project_info(&$projects) {
+function update_process_project_info(array &$projects) {
   foreach ($projects as $key => $project) {
     // Assume an official release until we see otherwise.
     $install_type = 'official';
@@ -72,7 +72,7 @@ function update_process_project_info(&$projects) {
  * @param array $available
  *   Data about available project releases.
  *
- * @return
+ * @return array
  *   An array of installed projects with current update status information.
  *
  * @see update_get_available()
@@ -80,7 +80,7 @@ function update_process_project_info(&$projects) {
  * @see update_process_project_info()
  * @see \Drupal\update\UpdateManagerInterface::projectStorage()
  */
-function update_calculate_project_data($available) {
+function update_calculate_project_data(array $available) {
   // Retrieve the projects from storage, if present.
   $projects = \Drupal::service('update.manager')->projectStorage('update_project_data');
   // If $projects is empty, then the data must be rebuilt.
@@ -165,12 +165,12 @@ function update_calculate_project_data($available) {
  * version (e.g., 5.x-1.5-beta1, 5.x-1.5-beta2, and 5.x-1.5). Development
  * snapshots for a given major version are always listed last.
  *
- * @param $project_data
+ * @param array $project_data
  *   An array containing information about a specific project.
- * @param $available
+ * @param array $available
  *   Data about available project releases of a specific project.
  */
-function update_calculate_project_update_status(&$project_data, $available) {
+function update_calculate_project_update_status(array &$project_data, array $available) {
   foreach (array('title', 'link') as $attribute) {
     if (!isset($project_data[$attribute]) && isset($available[$attribute])) {
       $project_data[$attribute] = $available[$attribute];
diff --git a/core/modules/update/update.fetch.inc b/core/modules/update/update.fetch.inc
index 1b111e5..a710dd9 100644
--- a/core/modules/update/update.fetch.inc
+++ b/core/modules/update/update.fetch.inc
@@ -48,4 +48,3 @@ function _update_cron_notify() {
     }
   }
 }
-
diff --git a/core/modules/update/update.install b/core/modules/update/update.install
index b2223f1..ca38b2b 100644
--- a/core/modules/update/update.install
+++ b/core/modules/update/update.install
@@ -10,19 +10,18 @@
 /**
  * Implements hook_requirements().
  *
- * @return
- *   An array describing the status of the site regarding available updates. If
- *   there is no update data, only one record will be returned, indicating that
- *   the status of core can't be determined. If data is available, there will be
- *   two records: one for core, and another for all of contrib (assuming there
- *   are any contributed modules or themes enabled on the site). In addition to
- *   the fields expected by hook_requirements ('value', 'severity', and
- *   optionally 'description'), this array will contain a 'reason' attribute,
- *   which is an integer constant to indicate why the given status is being
- *   returned (UPDATE_NOT_SECURE, UPDATE_NOT_CURRENT, or UPDATE_UNKNOWN). This
- *   is used for generating the appropriate email notification messages during
- *   update_cron(), and might be useful for other modules that invoke
- *   update_requirements() to find out if the site is up to date or not.
+ * Returns an array describing the status of the site regarding available
+ * updates. If there is no update data, only one record will be returned,
+ * indicating that the status of core can't be determined. If data is available,
+ * there will be two records: one for core, and another for all of contrib
+ * (assuming there are any contributed modules or themes enabled on the site).
+ * In addition to the fields expected by hook_requirements ('value', 'severity',
+ * and optionally 'description'), this array will contain a 'reason' attribute,
+ * which is an integer constant to indicate why the given status is being
+ * returned (UPDATE_NOT_SECURE, UPDATE_NOT_CURRENT, or UPDATE_UNKNOWN). This is
+ * used for generating the appropriate email notification messages during
+ * update_cron(), and might be useful for other modules that invoke
+ * update_requirements() to find out if the site is up to date or not.
  *
  * @see _update_message_text()
  * @see _update_cron_notify()
@@ -83,20 +82,20 @@ function update_uninstall() {
  * This is shared for both core and contrib to generate the right elements in
  * the array for hook_requirements().
  *
- * @param $project
+ * @param array $project
  *   Array of information about the project we're testing as returned by
  *   update_calculate_project_data().
- * @param $type
+ * @param string $type
  *   What kind of project this is ('core' or 'contrib').
  *
- * @return
+ * @return array
  *   An array to be included in the nested $requirements array.
  *
  * @see hook_requirements()
  * @see update_requirements()
  * @see update_calculate_project_data()
  */
-function _update_requirement_check($project, $type) {
+function _update_requirement_check(array $project, $type) {
   $requirement = array();
   if ($type == 'core') {
     $requirement['title'] = t('Drupal core update status');
diff --git a/core/modules/update/update.manager.inc b/core/modules/update/update.manager.inc
index f9c7c5f..fec9118 100644
--- a/core/modules/update/update.manager.inc
+++ b/core/modules/update/update.manager.inc
@@ -41,12 +41,12 @@
 /**
  * Batch callback: Performs actions when the download batch is completed.
  *
- * @param $success
+ * @param bool $success
  *   TRUE if the batch operation was successful, FALSE if there were errors.
- * @param $results
+ * @param array $results
  *   An associative array of results from the batch operation.
  */
-function update_manager_download_batch_finished($success, $results) {
+function update_manager_download_batch_finished($success, array $results) {
   if (!empty($results['errors'])) {
     $item_list = array(
       '#theme' => 'item_list',
@@ -76,12 +76,12 @@ function update_manager_download_batch_finished($success, $results) {
  *   The update manager operation we're in the middle of. Can be either 'update'
  *   or 'install'. Use to provide operation-specific interface text.
  *
- * @return
+ * @return bool
  *   TRUE if the update manager should continue to the next step in the
  *   workflow, or FALSE if we've hit a fatal configuration and must halt the
  *   workflow.
  */
-function _update_manager_check_backends(&$form, $operation) {
+function _update_manager_check_backends(array &$form, $operation) {
   // If file transfers will be performed locally, we do not need to display any
   // warnings or notices to the user and should automatically continue the
   // workflow, since we won't be using a FileTransfer backend that requires
@@ -146,6 +146,7 @@ function _update_manager_check_backends(&$form, $operation) {
  *   The Archiver object used to extract the archive.
  *
  * @throws Exception
+ *   Was unable to extract the archive.
  */
 function update_manager_archive_extract($file, $directory) {
   $archiver = archiver_get_archiver($file);
@@ -197,7 +198,7 @@ function update_manager_archive_verify($project, $archive_file, $directory) {
  *
  * Returns the local path if the file has already been downloaded.
  *
- * @param $url
+ * @param string $url
  *   The URL of the file on the server.
  *
  * @return string
@@ -241,7 +242,7 @@ function update_manager_file_get($url) {
  *
  * @see update_manager_download_page()
  */
-function update_manager_batch_project_get($project, $url, &$context) {
+function update_manager_batch_project_get($project, $url, array &$context) {
   // This is here to show the user that we are in the process of downloading.
   if (!isset($context['sandbox']['started'])) {
     $context['sandbox']['started'] = TRUE;
@@ -296,7 +297,7 @@ function update_manager_batch_project_get($project, $url, &$context) {
  * it. However, it is supported here because it is a common configuration on
  * shared hosting, and there is nothing Drupal can do to prevent it.
  *
- * @return
+ * @return bool
  *   TRUE if local file transfers are allowed on this server, or FALSE if not.
  *
  * @see install_check_requirements()
diff --git a/core/modules/update/update.module b/core/modules/update/update.module
index 98f7569..437fb75 100644
--- a/core/modules/update/update.module
+++ b/core/modules/update/update.module
@@ -173,7 +173,7 @@ function update_page_top() {
  * It both enforces the 'administer software updates' permission and the global
  * kill switch for the authorize.php script.
  *
- * @return
+ * @return bool
  *   TRUE if the current user can access the updater menu items; FALSE
  *   otherwise.
  */
@@ -251,7 +251,8 @@ function update_themes_installed($themes) {
 /**
  * Implements hook_themes_uninstalled().
  *
- * If themes are uninstalled, we invalidate the information of available updates.
+ * If themes are uninstalled, we invalidate the information of available
+ * updates.
  */
 function update_themes_uninstalled($themes) {
   // Clear all update module data.
@@ -302,11 +303,11 @@ function _update_no_data() {
  * logic in update_calculate_project_data() will be wrong and produce confusing,
  * bogus results.
  *
- * @param $refresh
+ * @param bool $refresh
  *   (optional) Boolean to indicate if this method should refresh automatically
  *   if there's no data. Defaults to FALSE.
  *
- * @return
+ * @return array
  *   Array of data about available releases, keyed by project shortname.
  *
  * @see update_refresh()
@@ -368,16 +369,15 @@ function update_get_available($refresh = FALSE) {
  * We only create a new fetch task if there's no task already in the queue for
  * this particular project (based on 'update_fetch_task' key-value collection).
  *
- * @param $project
+ * @param array $project
  *   Associative array of information about a project as created by
  *   \Drupal\Update\UpdateManager::getProjects(), including keys such as 'name'
  *   (short name), and the 'info' array with data from a .info.yml file for the
  *   project.
  *
  * @see \Drupal\update\UpdateFetcher::createFetchTask()
- *
  */
-function update_create_fetch_task($project) {
+function update_create_fetch_task(array $project) {
   \Drupal::service('update.processor')->createFetchTask($project);
 }
 
@@ -400,14 +400,14 @@ function update_fetch_data() {
 /**
  * Batch callback: Performs actions when all fetch tasks have been completed.
  *
- * @param $success
+ * @param bool $success
  *   TRUE if the batch operation was successful; FALSE if there were errors.
- * @param $results
+ * @param array $results
  *   An associative array of results from the batch operation, including the key
  *   'updated' which holds the total number of projects we fetched available
  *   update data for.
  */
-function update_fetch_data_finished($success, $results) {
+function update_fetch_data_finished($success, array $results) {
   if ($success) {
     if (!empty($results)) {
       if (!empty($results['updated'])) {
@@ -428,11 +428,11 @@ function update_fetch_data_finished($success, $results) {
  *
  * Constructs the email notification message when the site is out of date.
  *
- * @param $key
+ * @param string $key
  *   Unique key to indicate what message to build, always 'status_notify'.
- * @param $message
+ * @param array $message
  *   Reference to the message array being built.
- * @param $params
+ * @param array $params
  *   Array of parameters to indicate what kind of text to include in the message
  *   body. This is a keyed array of message type ('core' or 'contrib') as the
  *   keys, and the status reason constant (UPDATE_NOT_SECURE, etc) for the
@@ -442,7 +442,7 @@ function update_fetch_data_finished($success, $results) {
  * @see _update_cron_notify()
  * @see _update_message_text()
  */
-function update_mail($key, &$message, $params) {
+function update_mail($key, array &$message, array $params) {
   $langcode = $message['langcode'];
   $language = \Drupal::languageManager()->getLanguage($langcode);
   $message['subject'] .= t('New release(s) available for @site_name', array('@site_name' => \Drupal::config('system.site')->get('name')), array('langcode' => $langcode));
@@ -469,15 +469,15 @@ function update_mail($key, &$message, $params) {
  * site-wide status report at admin/reports/status and in the body of the
  * notification email messages generated by update_cron().
  *
- * @param $msg_type
+ * @param string $msg_type
  *   String to indicate what kind of message to generate. Can be either 'core'
  *   or 'contrib'.
- * @param $msg_reason
+ * @param int $msg_reason
  *   Integer constant specifying why message is generated.
- * @param $langcode
+ * @param string $langcode
  *   (optional) A language code to use. Defaults to NULL.
  *
- * @return
+ * @return string
  *   The properly translated error message for the given key.
  */
 function _update_message_text($msg_type, $msg_reason, $langcode = NULL) {
@@ -539,8 +539,20 @@ function _update_message_text($msg_type, $msg_reason, $langcode = NULL) {
  * Orders projects based on their status.
  *
  * Callback for uasort() within update_requirements().
+ *
+ * @param array $a
+ *   Associative array of information about a project. See update_get_projects()
+ *   for the keys used.
+ * @param array $b
+ *   Associative array of information about a project. See update_get_projects()
+ *   for the keys used.
+ *
+ * @return int
+ *   Callback return value for uasort().
+ *
+ * @see update_requirements()
  */
-function _update_project_status_sort($a, $b) {
+function _update_project_status_sort(array $a, array $b) {
   // The status constants are numerically in the right order, so we can
   // usually subtract the two to compare in the order we want. However,
   // negative status values should be treated as if they are huge, since we
@@ -559,13 +571,13 @@ function _update_project_status_sort($a, $b) {
  * provides a "Check manually" link that refreshes the available update and
  * redirects back to the same page.
  *
- * @param $variables
+ * @param array $variables
  *   An associative array containing:
  *   - last: The timestamp when the site last checked for available updates.
  *
  * @see theme_update_report()
  */
-function template_preprocess_update_last_check(&$variables) {
+function template_preprocess_update_last_check(array &$variables) {
   $variables['time'] = \Drupal::service('date.formatter')->formatTimeDiffSince($variables['last']);
   $variables['link'] = \Drupal::l(t('Check manually'), new Url('update.manual_status', array(), array('query' => \Drupal::destination()->getAsArray())));
 }
@@ -647,7 +659,7 @@ function update_storage_clear() {
 /**
  * Returns a short unique identifier for this Drupal installation.
  *
- * @return
+ * @return string
  *   An eight character string uniquely identifying this Drupal installation.
  */
 function _update_manager_unique_identifier() {
@@ -661,11 +673,11 @@ function _update_manager_unique_identifier() {
 /**
  * Returns the directory where update archive files should be extracted.
  *
- * @param $create
+ * @param bool $create
  *   (optional) Whether to attempt to create the directory if it does not
  *   already exist. Defaults to TRUE.
  *
- * @return
+ * @return string
  *   The full path to the temporary directory where update file archives should
  *   be extracted.
  */
@@ -683,11 +695,11 @@ function _update_manager_extract_directory($create = TRUE) {
 /**
  * Returns the directory where update archive files should be cached.
  *
- * @param $create
+ * @param bool $create
  *   (optional) Whether to attempt to create the directory if it does not
  *   already exist. Defaults to TRUE.
  *
- * @return
+ * @return string
  *   The full path to the temporary directory where update file archives should
  *   be cached.
  */
@@ -734,7 +746,7 @@ function update_clear_update_disk_cache() {
  * left alone by tar and correctly set to the time the archive file was
  * unpacked.
  *
- * @param $path
+ * @param string $path
  *   A string containing a file path or (streamwrapper) URI.
  */
 function update_delete_file_if_stale($path) {
diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc
index c1b461d..540dd0f 100644
--- a/core/modules/update/update.report.inc
+++ b/core/modules/update/update.report.inc
@@ -18,7 +18,7 @@
  *   An associative array containing:
  *   - data: An array of data about each project's status.
  */
-function template_preprocess_update_report(&$variables) {
+function template_preprocess_update_report(array &$variables) {
   $data = $variables['data'];
 
   $last = \Drupal::state()->get('update.last_check') ?: 0;
@@ -109,7 +109,7 @@ function template_preprocess_update_report(&$variables) {
  *   An associative array containing:
  *   - project: An array of information about the project.
  */
-function template_preprocess_update_project_status(&$variables) {
+function template_preprocess_update_project_status(array &$variables) {
   // Storing by reference because we are sorting the project values.
   $project = &$variables['project'];
 
