Convert variable names to camel case

[MAILPOET-1796]
This commit is contained in:
Jan Jakeš
2020-01-09 15:02:58 +01:00
committed by Jan Jakeš
parent f5da704106
commit 54549ff037
687 changed files with 15890 additions and 15887 deletions

View File

@ -13,23 +13,23 @@ class ValidatorFactory {
/** @var AnnotationReaderProvider */
private $annotation_reader_provider;
public function __construct(AnnotationReaderProvider $annotation_reader_provider) {
$this->annotation_reader_provider = $annotation_reader_provider;
public function __construct(AnnotationReaderProvider $annotationReaderProvider) {
$this->annotationReaderProvider = $annotationReaderProvider;
}
public function createValidator() {
$builder = Validation::createValidatorBuilder();
// annotation reader exists only in dev environment, on production cache is pre-generated
$annotation_reader = $this->annotation_reader_provider->getAnnotationReader();
if ($annotation_reader) {
$builder->enableAnnotationMapping($annotation_reader);
$annotationReader = $this->annotationReaderProvider->getAnnotationReader();
if ($annotationReader) {
$builder->enableAnnotationMapping($annotationReader);
}
// metadata cache (for production cache is pre-generated at build time)
$is_read_only = !$annotation_reader;
$metadata_cache = new MetadataCache(self::METADATA_DIR, $is_read_only);
$builder->setMetadataCache(new DoctrineCache($metadata_cache));
$isReadOnly = !$annotationReader;
$metadataCache = new MetadataCache(self::METADATA_DIR, $isReadOnly);
$builder->setMetadataCache(new DoctrineCache($metadataCache));
return $builder->getValidator();
}