diff vendor/symfony/validator/Mapping/MemberMetadata.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children
line wrap: on
line diff
--- a/vendor/symfony/validator/Mapping/MemberMetadata.php	Thu Feb 28 11:14:44 2019 +0000
+++ b/vendor/symfony/validator/Mapping/MemberMetadata.php	Thu Feb 28 13:11:55 2019 +0000
@@ -52,7 +52,7 @@
     /**
      * @var \ReflectionMethod[]|\ReflectionProperty[]
      */
-    private $reflMember = array();
+    private $reflMember = [];
 
     /**
      * @param string $class    The name of the class this member is defined on
@@ -71,11 +71,8 @@
      */
     public function addConstraint(Constraint $constraint)
     {
-        if (!in_array(Constraint::PROPERTY_CONSTRAINT, (array) $constraint->getTargets())) {
-            throw new ConstraintDefinitionException(sprintf(
-                'The constraint %s cannot be put on properties or getters',
-                get_class($constraint)
-            ));
+        if (!\in_array(Constraint::PROPERTY_CONSTRAINT, (array) $constraint->getTargets())) {
+            throw new ConstraintDefinitionException(sprintf('The constraint %s cannot be put on properties or getters', \get_class($constraint)));
         }
 
         parent::addConstraint($constraint);
@@ -88,11 +85,11 @@
      */
     public function __sleep()
     {
-        return array_merge(parent::__sleep(), array(
+        return array_merge(parent::__sleep(), [
             'class',
             'name',
             'property',
-        ));
+        ]);
     }
 
     /**
@@ -166,7 +163,7 @@
      */
     public function getReflectionMember($objectOrClassName)
     {
-        $className = is_string($objectOrClassName) ? $objectOrClassName : get_class($objectOrClassName);
+        $className = \is_string($objectOrClassName) ? $objectOrClassName : \get_class($objectOrClassName);
         if (!isset($this->reflMember[$className])) {
             $this->reflMember[$className] = $this->newReflectionMember($objectOrClassName);
         }