Remove useless code

This commit is contained in:
Victor Berchet 2011-07-04 14:08:20 +02:00
parent 4259530856
commit 2af2260c34
9 changed files with 0 additions and 35 deletions

View File

@ -122,9 +122,6 @@ abstract class AbstractDoctrineExtension extends Extension
protected function setMappingDriverConfig(array $mappingConfig, $mappingName)
{
if (is_dir($mappingConfig['dir'])) {
if (!isset($this->drivers[$mappingConfig['type']])) {
$this->drivers[$mappingConfig['type']] = array();
}
$this->drivers[$mappingConfig['type']][$mappingConfig['prefix']] = realpath($mappingConfig['dir']);
} else {
throw new \InvalidArgumentException(sprintf('Invalid Doctrine mapping path given. Cannot load Doctrine mapping/bundle named "%s".', $mappingName));

View File

@ -49,10 +49,6 @@ class FormPass implements CompilerPassInterface
? $tag[0]['alias']
: $serviceId;
if (!isset($typeExtensions[$alias])) {
$typeExtensions[$alias] = array();
}
$typeExtensions[$alias][] = $serviceId;
}

View File

@ -143,10 +143,6 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
$namespace = $this->getExtension($extension)->getAlias();
if (!isset($this->extensionConfigs[$namespace])) {
$this->extensionConfigs[$namespace] = array();
}
$this->extensionConfigs[$namespace][] = $this->getParameterBag()->resolveValue($values);
return $this;

View File

@ -367,10 +367,6 @@ class Definition
*/
public function addTag($name, array $attributes = array())
{
if (!isset($this->tags[$name])) {
$this->tags[$name] = array();
}
$this->tags[$name][] = $attributes;
return $this;

View File

@ -194,10 +194,6 @@ abstract class AbstractExtension implements FormExtensionInterface
$type = $extension->getExtendedType();
if (!isset($this->typeExtensions[$type])) {
$this->typeExtensions[$type] = array();
}
$this->typeExtensions[$type][] = $extension;
}
}

View File

@ -55,10 +55,6 @@ class TimezoneChoiceList implements ChoiceListInterface
$name = $parts[0];
}
if (!isset(static::$timezones[$region])) {
static::$timezones[$region] = array();
}
static::$timezones[$region][$timezone] = str_replace('_', ' ', $name);
}

View File

@ -71,10 +71,6 @@ class Translator implements TranslatorInterface
*/
public function addResource($format, $resource, $locale, $domain = 'messages')
{
if (!isset($this->resources[$locale])) {
$this->resources[$locale] = array();
}
$this->resources[$locale][] = array($format, $resource, $domain);
}

View File

@ -204,10 +204,6 @@ class ClassMetadata extends ElementMetadata
{
$property = $metadata->getPropertyName();
if (!isset($this->members[$property])) {
$this->members[$property] = array();
}
$this->members[$property][] = $metadata;
}

View File

@ -56,10 +56,6 @@ abstract class ElementMetadata
$this->constraints[] = $constraint;
foreach ($constraint->groups as $group) {
if (!isset($this->constraintsByGroup[$group])) {
$this->constraintsByGroup[$group] = array();
}
$this->constraintsByGroup[$group][] = $constraint;
}