private $translator;
/**
- * @var null|string
+ * @var string|null
*/
private $translationDomain;
*/
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.');
}
$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];
}