X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fthemes%2Fcontrib%2Fbootstrap%2Fsrc%2FPlugin%2FSetting%2FSchemas.php;h=bdf82580183f0887b86a276c483dca11100f89cf;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=d11b40c5c445f671ddaf3ca62b52bd72a1a085f5;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/web/themes/contrib/bootstrap/src/Plugin/Setting/Schemas.php b/web/themes/contrib/bootstrap/src/Plugin/Setting/Schemas.php index d11b40c5c..bdf825801 100644 --- a/web/themes/contrib/bootstrap/src/Plugin/Setting/Schemas.php +++ b/web/themes/contrib/bootstrap/src/Plugin/Setting/Schemas.php @@ -1,12 +1,7 @@ getPendingUpdates() as $update) { - $operations[] = [[__CLASS__, 'batchProcessUpdate'], [$theme_name, $update->getProvider() . ':' . $update->getSchema()]]; + $operations[] = [ + [__CLASS__, 'batchProcessUpdate'], + [$theme_name, $update->getProvider() . ':' . $update->getSchema()], + ]; } if ($operations) { @@ -123,7 +121,7 @@ class Schemas extends SettingBase { * Processes an update in a batch operation. * * @param string $theme_name - * The machine name of the theme this update is being applied to. + * The machine name of the theme this update is being applied to. * @param string $update_id * The combined identifier of the update being applied, e.g. * provider:schema. @@ -138,7 +136,7 @@ class Schemas extends SettingBase { list($provider, $plugin_id) = explode(':', $update_id); $provider = Bootstrap::getTheme($provider); - /** @type \Drupal\bootstrap\Plugin\Update\UpdateInterface $update */ + /* @type \Drupal\bootstrap\Plugin\Update\UpdateInterface $update */ $update = $provider->getUpdateManager()->createInstance($plugin_id, ['theme' => $provider]); // Initialize results with theme name and installed schemas. @@ -169,7 +167,7 @@ class Schemas extends SettingBase { $context['results']['success'][] = t('[@theme][@schema] @label', $variables); } - // Capture any errors. + // Capture any errors. catch (\Exception $e) { $variables['@message'] = $e->getMessage(); $context['results']['errors'][] = t('[@theme][@schema] @label - @message', $variables); @@ -177,18 +175,18 @@ class Schemas extends SettingBase { } /** - * Batch 'finished' callback + * Batch 'finished' callback. * * @param bool $success * A boolean indicating whether the batch has completed successfully. * @param array $results * The value(s) set in $context['results'] in * \Drupal\bootstrap\Plugin\Setting\Update::batchProcess(). - * @param $operations + * @param mixed $operations * If $success is FALSE, contains the operations that remained unprocessed. */ - public static function batchFinished($success, $results, $operations) { - /** @type \Drupal\bootstrap\Theme $theme */ + public static function batchFinished($success, array $results, $operations) { + /* @type \Drupal\bootstrap\Theme $theme */ // Reconstruct the theme object this update is being applied to. $theme = Bootstrap::getTheme($results['theme_name']);