diff --git a/color_field.module b/color_field.module --- a/color_field.module (revision d5ad2f542b5920542efb83a41cae8931134ca316) +++ b/color_field.module (revision a3929b4424ae92a3b47e31bbb1b218d04ec02fd1) @@ -208,7 +208,7 @@ * * Include the color_field in exports by the single_content_sync module. */ -function color_field_content_export_field_value_alter(mixed &$value, FieldItemListInterface $field): void { +function color_field_content_export_field_value_alter(&$value, FieldItemListInterface $field): void { switch ($field->getFieldDefinition()->getType()) { case 'color_field_type': $value[] = [ Index: src/ColorHex.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/src/ColorHex.php b/src/ColorHex.php --- a/src/ColorHex.php (revision d5ad2f542b5920542efb83a41cae8931134ca316) +++ b/src/ColorHex.php (revision a3929b4424ae92a3b47e31bbb1b218d04ec02fd1) @@ -30,7 +30,7 @@ public function __construct(string $color, ?string $opacity) { $color = trim(strtolower($color)); - if (str_starts_with($color, '#')) { + if (strpos($color, '#') === 0) { $color = substr($color, 1); } Index: src/Feeds/Target/Color.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/src/Feeds/Target/Color.php b/src/Feeds/Target/Color.php --- a/src/Feeds/Target/Color.php (revision d5ad2f542b5920542efb83a41cae8931134ca316) +++ b/src/Feeds/Target/Color.php (revision a3929b4424ae92a3b47e31bbb1b218d04ec02fd1) @@ -69,7 +69,7 @@ // Clean up data and format it. $color = trim($values['color']); - if (str_starts_with($color, '#')) { + if (strpos($color, '#') === 0) { $color = substr($color, 1); } Index: src/Plugin/Field/FieldFormatter/ColorFieldFormatterCss.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/src/Plugin/Field/FieldFormatter/ColorFieldFormatterCss.php b/src/Plugin/Field/FieldFormatter/ColorFieldFormatterCss.php --- a/src/Plugin/Field/FieldFormatter/ColorFieldFormatterCss.php (revision d5ad2f542b5920542efb83a41cae8931134ca316) +++ b/src/Plugin/Field/FieldFormatter/ColorFieldFormatterCss.php (revision a3929b4424ae92a3b47e31bbb1b218d04ec02fd1) @@ -47,7 +47,7 @@ * * @param string $plugin_id * The plugin_id for the formatter. - * @param mixed $plugin_definition + * @param $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The definition of the field to which the formatter is associated. @@ -64,7 +64,7 @@ * @param \Drupal\token\TokenEntityMapperInterface|null $token_entity_mapper * Optional token entity mapper service. */ - public function __construct(string $plugin_id, mixed $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, string $label, string $view_mode, array $third_party_settings, Token $token_service, ?TokenEntityMapperInterface $token_entity_mapper = NULL) { + public function __construct(string $plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, string $label, string $view_mode, array $third_party_settings, Token $token_service, ?TokenEntityMapperInterface $token_entity_mapper = NULL) { parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings); $this->tokenService = $token_service; $this->tokenEntityMapper = $token_entity_mapper; Index: src/Plugin/Field/FieldFormatter/ColorFieldFormatterSwatch.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/src/Plugin/Field/FieldFormatter/ColorFieldFormatterSwatch.php b/src/Plugin/Field/FieldFormatter/ColorFieldFormatterSwatch.php --- a/src/Plugin/Field/FieldFormatter/ColorFieldFormatterSwatch.php (revision d5ad2f542b5920542efb83a41cae8931134ca316) +++ b/src/Plugin/Field/FieldFormatter/ColorFieldFormatterSwatch.php (revision a3929b4424ae92a3b47e31bbb1b218d04ec02fd1) @@ -161,7 +161,7 @@ * @return \Drupal\Component\Render\MarkupInterface[]|\Drupal\Component\Render\MarkupInterface * An array of shape ids/names or translated name of the specified shape. */ - protected function getShape(?string $shape = NULL): array|MarkupInterface { + protected function getShape(?string $shape = NULL): array { $formats = []; $formats['square'] = $this->t('Square'); $formats['circle'] = $this->t('Circle'); Index: src/Plugin/Field/FieldFormatter/ColorFieldFormatterText.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/src/Plugin/Field/FieldFormatter/ColorFieldFormatterText.php b/src/Plugin/Field/FieldFormatter/ColorFieldFormatterText.php --- a/src/Plugin/Field/FieldFormatter/ColorFieldFormatterText.php (revision d5ad2f542b5920542efb83a41cae8931134ca316) +++ b/src/Plugin/Field/FieldFormatter/ColorFieldFormatterText.php (revision a3929b4424ae92a3b47e31bbb1b218d04ec02fd1) @@ -103,7 +103,7 @@ * @return \Drupal\Component\Render\MarkupInterface[]|\Drupal\Component\Render\MarkupInterface * Returns array or string. */ - protected function getColorFormat(?string $format = NULL): array|MarkupInterface { + protected function getColorFormat(?string $format = NULL): array { $formats = []; $formats['hex'] = $this->t('Hex triplet'); $formats['rgb'] = $this->t('RGB Decimal'); Index: src/Plugin/Field/FieldType/ColorFieldType.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/src/Plugin/Field/FieldType/ColorFieldType.php b/src/Plugin/Field/FieldType/ColorFieldType.php --- a/src/Plugin/Field/FieldType/ColorFieldType.php (revision d5ad2f542b5920542efb83a41cae8931134ca316) +++ b/src/Plugin/Field/FieldType/ColorFieldType.php (revision a3929b4424ae92a3b47e31bbb1b218d04ec02fd1) @@ -138,7 +138,7 @@ // Clean up data and format it. $color = trim($color); - if (str_starts_with($color, '#')) { + if (strpos($color, '#') === 0) { $color = substr($color, 1); } switch ($format) { Index: src/Plugin/Field/FieldWidget/ColorFieldWidgetBase.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/src/Plugin/Field/FieldWidget/ColorFieldWidgetBase.php b/src/Plugin/Field/FieldWidget/ColorFieldWidgetBase.php --- a/src/Plugin/Field/FieldWidget/ColorFieldWidgetBase.php (revision d5ad2f542b5920542efb83a41cae8931134ca316) +++ b/src/Plugin/Field/FieldWidget/ColorFieldWidgetBase.php (revision a3929b4424ae92a3b47e31bbb1b218d04ec02fd1) @@ -26,7 +26,7 @@ if (isset($items[$delta]->color)) { $color = $items[$delta]->color; - if (!str_starts_with($color, '#')) { + if (!(strpos($color, '#') === 0)) { $color = '#' . $color; } }