diff --git a/core/modules/update/lib/Drupal/update/Controller/UpdateFetchController.php b/core/modules/update/lib/Drupal/update/Controller/UpdateFetchController.php index e6e4655..765b311 100644 --- a/core/modules/update/lib/Drupal/update/Controller/UpdateFetchController.php +++ b/core/modules/update/lib/Drupal/update/Controller/UpdateFetchController.php @@ -9,7 +9,7 @@ namespace Drupal\update\Controller; -use Drupal\Core\ControllerInterface; +use Drupal\Core\Controller\ControllerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -18,12 +18,6 @@ class UpdateFetchController implements ControllerInterface { /** - * Constructs update status data. - */ - public function __construct() { - } - - /** * {@inheritdoc} */ public static function create(ContainerInterface $container) { diff --git a/core/modules/update/lib/Drupal/update/UpdateFetchManager.php b/core/modules/update/lib/Drupal/update/UpdateFetchManager.php index 4e758ae..324b71b 100644 --- a/core/modules/update/lib/Drupal/update/UpdateFetchManager.php +++ b/core/modules/update/lib/Drupal/update/UpdateFetchManager.php @@ -119,10 +119,12 @@ public function processFetchTask($project) { $frequency = $update_config->get('check.interval_days'); $available['last_fetch'] = REQUEST_TIME + $request_time_difference; - \Drupal::keyValueExpirable('update_available_releases')->setWithExpire($project_name, $available, $request_time_difference + (60 * 60 * 24 * $frequency)); + \Drupal::keyValueExpirable('update_available_releases') + ->setWithExpire($project_name, $available, $request_time_difference + (60 * 60 * 24 * $frequency)); // Stash the $fail data back in the DB for the next 5 minutes. - \Drupal::keyValueExpirable('update')->setWithExpire('fetch_failures', $fail, $request_time_difference + (60 * 5)); + \Drupal::keyValueExpirable('update') + ->setWithExpire('fetch_failures', $fail, $request_time_difference + (60 * 5)); // Whether this worked or not, we did just (try to) check for updates. state()->set('update.last_check', REQUEST_TIME + $request_time_difference); @@ -146,7 +148,7 @@ public function processFetchTask($project) { * @param $site_key * (optional) The anonymous site key hash. Defaults to an empty string. * - * @return + * @return string * The URL for fetching information about updates to the specified project. * * @see update_fetch_data(updateFetchData @@ -158,7 +160,7 @@ public function buildFetchUrl($project, $site_key = '') { $url = $this->getFetchUrlBase($project); $url .= '/' . $name . '/' . DRUPAL_CORE_COMPATIBILITY; - // Only append usage infomation if we have a site key and the project is + // Only append usage information if we have a site key and the project is // enabled. We do not want to record usage statistics for disabled projects. if (!empty($site_key) && (strpos($project['project_type'], 'disabled') === FALSE)) { // Append the site key. @@ -186,7 +188,7 @@ public function buildFetchUrl($project, $site_key = '') { * @param $project * The array of project information from updateGetProjects(). * - * @return + * @return string * The base of the URL used for fetching available update data. This does * not include the path elements to specify a particular project, version, * site_key, etc. @@ -212,7 +214,7 @@ public function getFetchUrlBase($project) { * @param $raw_xml * A raw XML string of available release data for a given project. * - * @return + * @return array|NULL * Array of parsed data about releases for a given project, or NULL if there * was an error parsing the string. */ diff --git a/core/modules/update/update.routing.yml b/core/modules/update/update.routing.yml index 76bd488..1c97981 100644 --- a/core/modules/update/update.routing.yml +++ b/core/modules/update/update.routing.yml @@ -17,4 +17,4 @@ update_check_manual: defaults: _content: '\Drupal\update\Controller\UpdateFetchController::updateManualStatus' requirements: - _permission: 'administer site configuration' \ No newline at end of file + _permission: 'administer site configuration' diff --git a/core/modules/update/update.services.yml b/core/modules/update/update.services.yml index 502986f..a60f412 100644 --- a/core/modules/update/update.services.yml +++ b/core/modules/update/update.services.yml @@ -2,4 +2,4 @@ services: update.fetch: class: Drupal\update\UpdateFetchManager update.compare: - class: Drupal\update\UpdateCompareManager \ No newline at end of file + class: Drupal\update\UpdateCompareManager