Skip to content
Snippets Groups Projects

PHP 8.4

Merged Claudiu Cristea requested to merge issue/metatag-3515603:3515603-php-8.4 into 2.1.x
Files
8
+ 4
4
@@ -324,7 +324,7 @@ class MetatagManager implements MetatagManagerInterface {
/**
* {@inheritdoc}
*/
public function form(array $values, array $element, array $token_types = [], array $included_groups = NULL, array $included_tags = NULL, $verbose_help = FALSE): array {
public function form(array $values, array $element, array $token_types = [], ?array $included_groups = NULL, ?array $included_tags = NULL, $verbose_help = FALSE): array {
// Add the outer fieldset.
$element += [
'#type' => 'details',
@@ -449,13 +449,13 @@ class MetatagManager implements MetatagManagerInterface {
/**
* Returns default meta tags for an entity.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* @param \Drupal\Core\Entity\ContentEntityInterface|null $entity
* The entity to work on.
*
* @return array
* The default meta tags appropriate for this entity.
*/
public function getDefaultMetatags(ContentEntityInterface $entity = NULL): array {
public function getDefaultMetatags(?ContentEntityInterface $entity = NULL): array {
// Get general global metatags.
$metatags = $this->getGlobalMetatags();
// If that is empty something went wrong.
@@ -579,7 +579,7 @@ class MetatagManager implements MetatagManagerInterface {
/**
* {@inheritdoc}
*/
public function generateRawElements(array $tags, $entity = NULL, BubbleableMetadata $cache = NULL): array {
public function generateRawElements(array $tags, $entity = NULL, ?BubbleableMetadata $cache = NULL): array {
// Ignore the update.php path.
$request = $this->requestStack->getCurrentRequest();
if ($request->getBaseUrl() == '/update.php') {
Loading