Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/validator/ValidatorBuilder.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
line wrap: on
line diff
--- a/vendor/symfony/validator/ValidatorBuilder.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/symfony/validator/ValidatorBuilder.php Thu Feb 28 13:21:36 2019 +0000 @@ -37,10 +37,10 @@ */ class ValidatorBuilder implements ValidatorBuilderInterface { - private $initializers = array(); - private $xmlMappings = array(); - private $yamlMappings = array(); - private $methodMappings = array(); + private $initializers = []; + private $xmlMappings = []; + private $yamlMappings = []; + private $methodMappings = []; /** * @var Reader|null @@ -68,7 +68,7 @@ private $translator; /** - * @var null|string + * @var string|null */ private $translationDomain; @@ -213,7 +213,7 @@ */ public function setMetadataFactory(MetadataFactoryInterface $metadataFactory) { - if (count($this->xmlMappings) > 0 || count($this->yamlMappings) > 0 || count($this->methodMappings) > 0 || null !== $this->annotationReader) { + if (\count($this->xmlMappings) > 0 || \count($this->yamlMappings) > 0 || \count($this->methodMappings) > 0 || null !== $this->annotationReader) { throw new ValidatorException('You cannot set a custom metadata factory after adding custom mappings. You should do either of both.'); } @@ -271,7 +271,7 @@ */ public function getLoaders() { - $loaders = array(); + $loaders = []; foreach ($this->xmlMappings as $xmlMapping) { $loaders[] = new XmlFileLoader($xmlMapping); @@ -303,9 +303,9 @@ $loaders = $this->getLoaders(); $loader = null; - if (count($loaders) > 1) { + if (\count($loaders) > 1) { $loader = new LoaderChain($loaders); - } elseif (1 === count($loaders)) { + } elseif (1 === \count($loaders)) { $loader = $loaders[0]; }