Commit 3302a0ae authored by catch's avatar catch
Browse files

Issue #2926855 by Wim Leers, vacho: Normalize docblock + value of all...

Issue #2926855 by Wim Leers, vacho: Normalize  docblock + value of all NormalizerInterface::$supportedInterfaceOrClass occurrences
parent 75a42131
......@@ -3,6 +3,7 @@
namespace Drupal\hal\Normalizer;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
......@@ -19,11 +20,9 @@ class ContentEntityNormalizer extends NormalizerBase {
use FieldableEntityNormalizerTrait;
/**
* The interface or class that this Normalizer supports.
*
* @var string
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = 'Drupal\Core\Entity\ContentEntityInterface';
protected $supportedInterfaceOrClass = ContentEntityInterface::class;
/**
* The hypermedia link manager.
......
......@@ -19,11 +19,9 @@ class EntityReferenceItemNormalizer extends FieldItemNormalizer implements UuidR
use EntityReferenceFieldItemNormalizerTrait;
/**
* The interface or class that this Normalizer supports.
*
* @var string
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = 'Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem';
protected $supportedInterfaceOrClass = EntityReferenceItem::class;
/**
* The hypermedia link manager.
......
......@@ -12,11 +12,9 @@
class FieldItemNormalizer extends NormalizerBase {
/**
* The interface or class that this Normalizer supports.
*
* @var string
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = 'Drupal\Core\Field\FieldItemInterface';
protected $supportedInterfaceOrClass = FieldItemInterface::class;
/**
* {@inheritdoc}
......
......@@ -17,11 +17,9 @@
class FileEntityNormalizer extends ContentEntityNormalizer {
/**
* The interface or class that this Normalizer supports.
*
* @var string
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = 'Drupal\file\FileInterface';
protected $supportedInterfaceOrClass = FileInterface::class;
/**
* The HTTP client.
......
......@@ -14,9 +14,7 @@ class TimestampItemNormalizer extends FieldItemNormalizer {
use TimeStampItemNormalizerTrait;
/**
* The interface or class that this Normalizer supports.
*
* @var string
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = TimestampItem::class;
......
......@@ -18,11 +18,9 @@
class ComplexDataNormalizer extends NormalizerBase {
/**
* The interface or class that this Normalizer supports.
*
* @var string
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = 'Drupal\Core\TypedData\ComplexDataInterface';
protected $supportedInterfaceOrClass = ComplexDataInterface::class;
/**
* {@inheritdoc}
......
......@@ -2,17 +2,17 @@
namespace Drupal\serialization\Normalizer;
use Drupal\Core\Config\Entity\ConfigEntityInterface;
/**
* Normalizes/denormalizes Drupal config entity objects into an array structure.
*/
class ConfigEntityNormalizer extends EntityNormalizer {
/**
* The interface or class that this Normalizer supports.
*
* @var array
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = ['Drupal\Core\Config\Entity\ConfigEntityInterface'];
protected $supportedInterfaceOrClass = ConfigEntityInterface::class;
/**
* {@inheritdoc}
......
......@@ -2,6 +2,7 @@
namespace Drupal\serialization\Normalizer;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\TypedData\TypedDataInternalPropertiesHelper;
/**
......@@ -12,7 +13,7 @@ class ContentEntityNormalizer extends EntityNormalizer {
/**
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = ['Drupal\Core\Entity\ContentEntityInterface'];
protected $supportedInterfaceOrClass = ContentEntityInterface::class;
/**
* {@inheritdoc}
......
......@@ -15,11 +15,9 @@ class EntityNormalizer extends ComplexDataNormalizer implements DenormalizerInte
use FieldableEntityNormalizerTrait;
/**
* The interface or class that this Normalizer supports.
*
* @var array
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = [EntityInterface::class];
protected $supportedInterfaceOrClass = EntityInterface::class;
/**
* Constructs an EntityNormalizer object.
......
......@@ -15,9 +15,7 @@ class EntityReferenceFieldItemNormalizer extends FieldItemNormalizer {
use EntityReferenceFieldItemNormalizerTrait;
/**
* The interface or class that this Normalizer supports.
*
* @var string
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = EntityReferenceItem::class;
......
......@@ -2,6 +2,8 @@
namespace Drupal\serialization\Normalizer;
use Drupal\Core\TypedData\ListInterface;
/**
* Converts list objects to arrays.
*
......@@ -14,11 +16,9 @@
class ListNormalizer extends NormalizerBase {
/**
* The interface or class that this Normalizer supports.
*
* @var string
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = 'Drupal\Core\TypedData\ListInterface';
protected $supportedInterfaceOrClass = ListInterface::class;
/**
* {@inheritdoc}
......
......@@ -2,17 +2,17 @@
namespace Drupal\serialization\Normalizer;
use Drupal\Component\Render\MarkupInterface;
/**
* Normalizes MarkupInterface objects into a string.
*/
class MarkupNormalizer extends NormalizerBase {
/**
* The interface or class that this Normalizer supports.
*
* @var array
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = ['Drupal\Component\Render\MarkupInterface'];
protected $supportedInterfaceOrClass = MarkupInterface::class;
/**
* {@inheritdoc}
......
......@@ -10,9 +10,7 @@
class PrimitiveDataNormalizer extends NormalizerBase {
/**
* The interface or class that this Normalizer supports.
*
* @var string
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = PrimitiveInterface::class;
......
......@@ -13,9 +13,7 @@ class TimestampItemNormalizer extends FieldItemNormalizer {
use TimeStampItemNormalizerTrait;
/**
* The interface or class that this Normalizer supports.
*
* @var string
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = TimestampItem::class;
......
......@@ -2,17 +2,17 @@
namespace Drupal\serialization\Normalizer;
use Drupal\Core\TypedData\TypedDataInterface;
/**
* Converts typed data objects to arrays.
*/
class TypedDataNormalizer extends NormalizerBase {
/**
* The interface or class that this Normalizer supports.
*
* @var string
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = 'Drupal\Core\TypedData\TypedDataInterface';
protected $supportedInterfaceOrClass = TypedDataInterface::class;
/**
* {@inheritdoc}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment