Loading core/lib/Drupal/Core/Authentication/AuthenticationCollector.php +1 −4 Original line number Diff line number Diff line Loading @@ -72,10 +72,7 @@ public function getSortedProviders() { krsort($this->providerOrders); // Merge nested providers from $this->providers into $this->sortedProviders. $this->sortedProviders = []; foreach ($this->providerOrders as $providers) { $this->sortedProviders = array_merge($this->sortedProviders, $providers); } $this->sortedProviders = array_merge([], ...$this->providerOrders); } return $this->sortedProviders; Loading core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php +1 −4 Original line number Diff line number Diff line Loading @@ -107,10 +107,7 @@ protected function getSortedBuilders() { // Sort the builders according to priority. krsort($this->builders); // Merge nested builders from $this->builders into $this->sortedBuilders. $this->sortedBuilders = []; foreach ($this->builders as $builders) { $this->sortedBuilders = array_merge($this->sortedBuilders, $builders); } $this->sortedBuilders = array_merge([], ...$this->builders); } return $this->sortedBuilders; } Loading core/lib/Drupal/Core/Config/ConfigManager.php +2 −2 Original line number Diff line number Diff line Loading @@ -264,9 +264,9 @@ public function findConfigEntityDependencies($type, array $names, ConfigDependen } $dependencies = []; foreach ($names as $name) { $dependencies = array_merge($dependencies, $dependency_manager->getDependentEntities($type, $name)); $dependencies[] = $dependency_manager->getDependentEntities($type, $name); } return $dependencies; return array_merge([], ...$dependencies); } /** Loading core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php +5 −3 Original line number Diff line number Diff line Loading @@ -58,8 +58,9 @@ public function checkConfigSchema(TypedConfigManagerInterface $typed_config, $co $this->schema = $typed_config->createFromNameAndData($config_name, $config_data); $errors = []; foreach ($config_data as $key => $value) { $errors = array_merge($errors, $this->checkValue($key, $value)); $errors[] = $this->checkValue($key, $value); } $errors = array_merge([], ...$errors); if (empty($errors)) { return TRUE; } Loading Loading @@ -130,11 +131,12 @@ protected function checkValue($key, $value) { if (!is_array($value)) { $value = (array) $value; } $nested_errors = []; // Recurse into any nested keys. foreach ($value as $nested_value_key => $nested_value) { $errors = array_merge($errors, $this->checkValue($key . '.' . $nested_value_key, $nested_value)); $nested_errors[] = $this->checkValue($key . '.' . $nested_value_key, $nested_value); } return $errors; return array_merge($errors, ...$nested_errors); } // No errors found. return []; Loading core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php +5 −3 Original line number Diff line number Diff line Loading @@ -340,12 +340,14 @@ public function fieldAccess($operation, FieldDefinitionInterface $field_definiti $default = $default->andIf($entity_default); // Invoke hook and collect grants/denies for field access from other // modules. Our default access flag is masked under the ':default' key. $grants = [':default' => $default]; // modules. $grants = []; $hook_implementations = $this->moduleHandler()->getImplementations('entity_field_access'); foreach ($hook_implementations as $module) { $grants = array_merge($grants, [$module => $this->moduleHandler()->invoke($module, 'entity_field_access', [$operation, $field_definition, $account, $items])]); $grants[] = [$module => $this->moduleHandler()->invoke($module, 'entity_field_access', [$operation, $field_definition, $account, $items])]; } // Our default access flag is masked under the ':default' key. $grants = array_merge([':default' => $default], ...$grants); // Also allow modules to alter the returned grants/denies. $context = [ Loading Loading
core/lib/Drupal/Core/Authentication/AuthenticationCollector.php +1 −4 Original line number Diff line number Diff line Loading @@ -72,10 +72,7 @@ public function getSortedProviders() { krsort($this->providerOrders); // Merge nested providers from $this->providers into $this->sortedProviders. $this->sortedProviders = []; foreach ($this->providerOrders as $providers) { $this->sortedProviders = array_merge($this->sortedProviders, $providers); } $this->sortedProviders = array_merge([], ...$this->providerOrders); } return $this->sortedProviders; Loading
core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php +1 −4 Original line number Diff line number Diff line Loading @@ -107,10 +107,7 @@ protected function getSortedBuilders() { // Sort the builders according to priority. krsort($this->builders); // Merge nested builders from $this->builders into $this->sortedBuilders. $this->sortedBuilders = []; foreach ($this->builders as $builders) { $this->sortedBuilders = array_merge($this->sortedBuilders, $builders); } $this->sortedBuilders = array_merge([], ...$this->builders); } return $this->sortedBuilders; } Loading
core/lib/Drupal/Core/Config/ConfigManager.php +2 −2 Original line number Diff line number Diff line Loading @@ -264,9 +264,9 @@ public function findConfigEntityDependencies($type, array $names, ConfigDependen } $dependencies = []; foreach ($names as $name) { $dependencies = array_merge($dependencies, $dependency_manager->getDependentEntities($type, $name)); $dependencies[] = $dependency_manager->getDependentEntities($type, $name); } return $dependencies; return array_merge([], ...$dependencies); } /** Loading
core/lib/Drupal/Core/Config/Schema/SchemaCheckTrait.php +5 −3 Original line number Diff line number Diff line Loading @@ -58,8 +58,9 @@ public function checkConfigSchema(TypedConfigManagerInterface $typed_config, $co $this->schema = $typed_config->createFromNameAndData($config_name, $config_data); $errors = []; foreach ($config_data as $key => $value) { $errors = array_merge($errors, $this->checkValue($key, $value)); $errors[] = $this->checkValue($key, $value); } $errors = array_merge([], ...$errors); if (empty($errors)) { return TRUE; } Loading Loading @@ -130,11 +131,12 @@ protected function checkValue($key, $value) { if (!is_array($value)) { $value = (array) $value; } $nested_errors = []; // Recurse into any nested keys. foreach ($value as $nested_value_key => $nested_value) { $errors = array_merge($errors, $this->checkValue($key . '.' . $nested_value_key, $nested_value)); $nested_errors[] = $this->checkValue($key . '.' . $nested_value_key, $nested_value); } return $errors; return array_merge($errors, ...$nested_errors); } // No errors found. return []; Loading
core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php +5 −3 Original line number Diff line number Diff line Loading @@ -340,12 +340,14 @@ public function fieldAccess($operation, FieldDefinitionInterface $field_definiti $default = $default->andIf($entity_default); // Invoke hook and collect grants/denies for field access from other // modules. Our default access flag is masked under the ':default' key. $grants = [':default' => $default]; // modules. $grants = []; $hook_implementations = $this->moduleHandler()->getImplementations('entity_field_access'); foreach ($hook_implementations as $module) { $grants = array_merge($grants, [$module => $this->moduleHandler()->invoke($module, 'entity_field_access', [$operation, $field_definition, $account, $items])]); $grants[] = [$module => $this->moduleHandler()->invoke($module, 'entity_field_access', [$operation, $field_definition, $account, $items])]; } // Our default access flag is masked under the ':default' key. $grants = array_merge([':default' => $default], ...$grants); // Also allow modules to alter the returned grants/denies. $context = [ Loading