Skip to content
Snippets Groups Projects

Resolve #3500902 "Drupal 11 compatibility"

2 files
+ 5
6
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -27,14 +27,14 @@ class PlaintextEncoder implements EncoderInterface, DecoderInterface {
/**
* {@inheritdoc}
*/
public function supportsEncoding($format) {
public function supportsEncoding($format): bool {
return $format == static::$format;
}
/**
* {@inheritdoc}
*/
public function supportsDecoding($format) {
public function supportsDecoding($format): bool {
return $format == static::$format;
}
@@ -43,7 +43,7 @@ class PlaintextEncoder implements EncoderInterface, DecoderInterface {
*
* Uses HTML-safe strings, with several characters escaped.
*/
public function encode($data, $format, array $context = []) {
public function encode($data, $format, array $context = []): string {
switch (gettype($data)) {
case "array":
break;
@@ -125,7 +125,7 @@ class PlaintextEncoder implements EncoderInterface, DecoderInterface {
/**
* {@inheritdoc}
*/
public function decode($data, $format, array $context = []) {
public function decode($data, $format, array $context = []): mixed {
$results = [];
return $results;
}
Loading