Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / user / src / Plugin / views / field / Roles.php
index e7d9495bcadd636a6fee21ef050993b552bdae99..eec26f88ac214f5551cfee20e81c76918a5e7d1f 100644 (file)
@@ -25,7 +25,7 @@ class Roles extends PrerenderList {
   protected $database;
 
   /**
-   * Constructs a Drupal\Component\Plugin\PluginBase object.
+   * Constructs a \Drupal\user\Plugin\views\field\Roles object.
    *
    * @param array $configuration
    *   A configuration array containing information about the plugin instance.
@@ -82,7 +82,7 @@ class Roles extends PrerenderList {
       $ordered_roles = array_flip(array_keys($roles));
       foreach ($this->items as &$user_roles) {
         // Create an array of rids that the user has in the role weight order.
-        $sorted_keys  = array_intersect_key($ordered_roles, $user_roles);
+        $sorted_keys = array_intersect_key($ordered_roles, $user_roles);
         // Merge with the unsorted array of role information which has the
         // effect of sorting it.
         $user_roles = array_merge($sorted_keys, $user_roles);