Remove some unused variables and properties
This commit is contained in:
parent
5cb35fe959
commit
8bc2fbb934
@ -112,7 +112,7 @@ class RegisterEventListenersAndSubscribersPass implements CompilerPassInterface
|
||||
}
|
||||
$instance['event'] = array($instance['event']);
|
||||
|
||||
if ($lazy = !empty($instance['lazy'])) {
|
||||
if (!empty($instance['lazy'])) {
|
||||
$this->container->getDefinition($id)->setPublic(true);
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ final class Dotenv
|
||||
$this->end = strlen($this->data);
|
||||
$this->state = self::STATE_VARNAME;
|
||||
$this->values = array();
|
||||
$name = $value = '';
|
||||
$name = '';
|
||||
|
||||
$this->skipEmptyLines();
|
||||
|
||||
|
@ -23,7 +23,6 @@ use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
class DateIntervalToStringTransformer implements DataTransformerInterface
|
||||
{
|
||||
private $format;
|
||||
private $parseSigned;
|
||||
|
||||
/**
|
||||
* Transforms a \DateInterval instance to a string.
|
||||
@ -31,12 +30,10 @@ class DateIntervalToStringTransformer implements DataTransformerInterface
|
||||
* @see \DateInterval::format() for supported formats
|
||||
*
|
||||
* @param string $format The date format
|
||||
* @param bool $parseSigned Whether to parse as a signed interval
|
||||
*/
|
||||
public function __construct($format = 'P%yY%mM%dDT%hH%iM%sS', $parseSigned = false)
|
||||
public function __construct($format = 'P%yY%mM%dDT%hH%iM%sS')
|
||||
{
|
||||
$this->format = $format;
|
||||
$this->parseSigned = $parseSigned;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@ class RemoveEmptyControllerArgumentLocatorsPass implements CompilerPassInterface
|
||||
$action = substr(strrchr($controller, ':'), 1);
|
||||
$id = substr($controller, 0, -1 - strlen($action));
|
||||
$controllerDef = $container->getDefinition($id);
|
||||
foreach ($controllerDef->getMethodCalls() as list($method, $args)) {
|
||||
foreach ($controllerDef->getMethodCalls() as list($method)) {
|
||||
if (0 === strcasecmp($action, $method)) {
|
||||
$reason = sprintf('Removing method "%s" of service "%s" from controller candidates: the method is called at instantiation, thus cannot be an action.', $action, $id);
|
||||
break;
|
||||
|
@ -24,7 +24,6 @@ class JsonDecode implements DecoderInterface
|
||||
|
||||
private $associative;
|
||||
private $recursionDepth;
|
||||
private $lastError = JSON_ERROR_NONE;
|
||||
|
||||
/**
|
||||
* Constructs a new JsonDecode instance.
|
||||
@ -75,7 +74,7 @@ class JsonDecode implements DecoderInterface
|
||||
|
||||
$decodedData = json_decode($data, $associative, $recursionDepth, $options);
|
||||
|
||||
if (JSON_ERROR_NONE !== $this->lastError = json_last_error()) {
|
||||
if (JSON_ERROR_NONE !== json_last_error()) {
|
||||
throw new UnexpectedValueException(json_last_error_msg());
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,6 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException;
|
||||
class JsonEncode implements EncoderInterface
|
||||
{
|
||||
private $options;
|
||||
private $lastError = JSON_ERROR_NONE;
|
||||
|
||||
public function __construct($bitmask = 0)
|
||||
{
|
||||
@ -39,7 +38,7 @@ class JsonEncode implements EncoderInterface
|
||||
|
||||
$encodedJson = json_encode($data, $context['json_encode_options']);
|
||||
|
||||
if (JSON_ERROR_NONE !== $this->lastError = json_last_error()) {
|
||||
if (JSON_ERROR_NONE !== json_last_error()) {
|
||||
throw new UnexpectedValueException(json_last_error_msg());
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,6 @@ class ConstraintViolationAssertion
|
||||
private $parameters = array();
|
||||
private $invalidValue = 'InvalidValue';
|
||||
private $propertyPath = 'property.path';
|
||||
private $translationDomain;
|
||||
private $plural;
|
||||
private $code;
|
||||
private $constraint;
|
||||
@ -264,7 +263,7 @@ class ConstraintViolationAssertion
|
||||
|
||||
public function setTranslationDomain($translationDomain)
|
||||
{
|
||||
$this->translationDomain = $translationDomain;
|
||||
// no-op for BC
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user