[Form] Changed isset() to array_key_exists() to be consistent with ParameterBag
This commit is contained in:
parent
7b438a816b
commit
7b07925fad
@ -710,7 +710,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
|
|||||||
*/
|
*/
|
||||||
public function hasAttribute($name)
|
public function hasAttribute($name)
|
||||||
{
|
{
|
||||||
return isset($this->attributes[$name]);
|
return array_key_exists($name, $this->attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -723,7 +723,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
|
|||||||
*/
|
*/
|
||||||
public function getAttribute($name, $default = null)
|
public function getAttribute($name, $default = null)
|
||||||
{
|
{
|
||||||
return isset($this->attributes[$name]) ? $this->attributes[$name] : $default;
|
return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -785,7 +785,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
|
|||||||
*/
|
*/
|
||||||
public function hasOption($name)
|
public function hasOption($name)
|
||||||
{
|
{
|
||||||
return isset($this->options[$name]);
|
return array_key_exists($name, $this->options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -798,7 +798,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
|
|||||||
*/
|
*/
|
||||||
public function getOption($name, $default = null)
|
public function getOption($name, $default = null)
|
||||||
{
|
{
|
||||||
return isset($this->options[$name]) ? $this->options[$name] : $default;
|
return array_key_exists($name, $this->options) ? $this->options[$name] : $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -392,7 +392,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
|
|||||||
*/
|
*/
|
||||||
public function hasAttribute($name)
|
public function hasAttribute($name)
|
||||||
{
|
{
|
||||||
return isset($this->attributes[$name]);
|
return array_key_exists($name, $this->attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -400,7 +400,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
|
|||||||
*/
|
*/
|
||||||
public function getAttribute($name, $default = null)
|
public function getAttribute($name, $default = null)
|
||||||
{
|
{
|
||||||
return isset($this->attributes[$name]) ? $this->attributes[$name] : $default;
|
return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -448,7 +448,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
|
|||||||
*/
|
*/
|
||||||
public function hasOption($name)
|
public function hasOption($name)
|
||||||
{
|
{
|
||||||
return isset($this->options[$name]);
|
return array_key_exists($name, $this->options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -456,7 +456,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
|
|||||||
*/
|
*/
|
||||||
public function getOption($name, $default = null)
|
public function getOption($name, $default = null)
|
||||||
{
|
{
|
||||||
return isset($this->options[$name]) ? $this->options[$name] : $default;
|
return array_key_exists($name, $this->options) ? $this->options[$name] : $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user