Removed dead code and various cleaning

This commit is contained in:
sarah khalil 2015-01-20 22:49:28 +01:00
parent 77cb48e1e2
commit dbbe170168
13 changed files with 7 additions and 22 deletions

View File

@ -59,7 +59,7 @@ class XmlReferenceDumper
}); });
if (count($remapping)) { if (count($remapping)) {
list($singular, $plural) = current($remapping); list($singular) = current($remapping);
$rootName = $singular; $rootName = $singular;
} }
} }

View File

@ -14,7 +14,6 @@ namespace Symfony\Component\Config\Definition\Dumper;
use Symfony\Component\Config\Definition\ConfigurationInterface; use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\Config\Definition\NodeInterface; use Symfony\Component\Config\Definition\NodeInterface;
use Symfony\Component\Config\Definition\ArrayNode; use Symfony\Component\Config\Definition\ArrayNode;
use Symfony\Component\Config\Definition\ScalarNode;
use Symfony\Component\Config\Definition\EnumNode; use Symfony\Component\Config\Definition\EnumNode;
use Symfony\Component\Config\Definition\PrototypedArrayNode; use Symfony\Component\Config\Definition\PrototypedArrayNode;
use Symfony\Component\Yaml\Inline; use Symfony\Component\Yaml\Inline;

View File

@ -105,7 +105,7 @@ class MarkdownDescriptor extends Descriptor
$this->write($help); $this->write($help);
} }
if ($definition = $command->getNativeDefinition()) { if ($command->getNativeDefinition()) {
$this->write("\n\n"); $this->write("\n\n");
$this->describeInputDefinition($command->getNativeDefinition()); $this->describeInputDefinition($command->getNativeDefinition());
} }

View File

@ -50,7 +50,7 @@ class ExceptionHandler
*/ */
public static function register($debug = true, $fileLinkFormat = null) public static function register($debug = true, $fileLinkFormat = null)
{ {
$handler = new static($debug, $fileLinkFormat = null); $handler = new static($debug, $fileLinkFormat);
$prev = set_exception_handler(array($handler, 'handle')); $prev = set_exception_handler(array($handler, 'handle'));
if (is_array($prev) && $prev[0] instanceof ErrorHandler) { if (is_array($prev) && $prev[0] instanceof ErrorHandler) {

View File

@ -33,7 +33,6 @@ class CheckReferenceValidityPass implements CompilerPassInterface
{ {
private $container; private $container;
private $currentId; private $currentId;
private $currentDefinition;
private $currentScope; private $currentScope;
private $currentScopeAncestors; private $currentScopeAncestors;
private $currentScopeChildren; private $currentScopeChildren;

View File

@ -24,7 +24,7 @@ use Symfony\Component\VarDumper\VarDumper;
*/ */
class DumpListener implements EventSubscriberInterface class DumpListener implements EventSubscriberInterface
{ {
private $container; private $cloner;
private $dumper; private $dumper;
/** /**

View File

@ -172,7 +172,7 @@ class UnixPipes extends AbstractPipes
} }
if (null !== $w && 0 < count($w)) { if (null !== $w && 0 < count($w)) {
while ($len = strlen($this->inputBuffer)) { while (strlen($this->inputBuffer)) {
$written = fwrite($w[0], $this->inputBuffer, 2 << 18); // write 512k $written = fwrite($w[0], $this->inputBuffer, 2 << 18); // write 512k
if ($written > 0) { if ($written > 0) {
$this->inputBuffer = (string) substr($this->inputBuffer, $written); $this->inputBuffer = (string) substr($this->inputBuffer, $written);

View File

@ -235,7 +235,7 @@ class WindowsPipes extends AbstractPipes
} }
if (null !== $w && 0 < count($w)) { if (null !== $w && 0 < count($w)) {
while ($len = strlen($this->inputBuffer)) { while (strlen($this->inputBuffer)) {
$written = fwrite($w[0], $this->inputBuffer, 2 << 18); $written = fwrite($w[0], $this->inputBuffer, 2 << 18);
if ($written > 0) { if ($written > 0) {
$this->inputBuffer = (string) substr($this->inputBuffer, $written); $this->inputBuffer = (string) substr($this->inputBuffer, $written);

View File

@ -579,8 +579,6 @@ class PropertyAccessor implements PropertyAccessorInterface
*/ */
private function findAdderAndRemover(\ReflectionClass $reflClass, array $singulars) private function findAdderAndRemover(\ReflectionClass $reflClass, array $singulars)
{ {
$exception = null;
foreach ($singulars as $singular) { foreach ($singulars as $singular) {
$addMethod = 'add'.$singular; $addMethod = 'add'.$singular;
$removeMethod = 'remove'.$singular; $removeMethod = 'remove'.$singular;

View File

@ -853,7 +853,6 @@ QUERY;
{ {
$sids = new \SplObjectStorage(); $sids = new \SplObjectStorage();
$classIds = new \SplObjectStorage(); $classIds = new \SplObjectStorage();
$currentIds = array();
foreach ($changes[1] as $field => $new) { foreach ($changes[1] as $field => $new) {
for ($i = 0, $c = count($new); $i<$c; $i++) { for ($i = 0, $c = count($new); $i<$c; $i++) {
$ace = $new[$i]; $ace = $new[$i];
@ -881,8 +880,6 @@ QUERY;
$aceIdProperty = new \ReflectionProperty('Symfony\Component\Security\Acl\Domain\Entry', 'id'); $aceIdProperty = new \ReflectionProperty('Symfony\Component\Security\Acl\Domain\Entry', 'id');
$aceIdProperty->setAccessible(true); $aceIdProperty->setAccessible(true);
$aceIdProperty->setValue($ace, intval($aceId)); $aceIdProperty->setValue($ace, intval($aceId));
} else {
$currentIds[$ace->getId()] = true;
} }
} }
} }

View File

@ -46,7 +46,7 @@ class IsbnValidator extends ConstraintValidator
$value = (string) $value; $value = (string) $value;
$canonical = str_replace('-', '', $value); $canonical = str_replace('-', '', $value);
if (null == $constraint->type) { if (null === $constraint->type) {
if ($constraint->isbn10 && !$constraint->isbn13) { if ($constraint->isbn10 && !$constraint->isbn13) {
$constraint->type = 'isbn10'; $constraint->type = 'isbn10';
} elseif ($constraint->isbn13 && !$constraint->isbn10) { } elseif ($constraint->isbn13 && !$constraint->isbn10) {

View File

@ -40,11 +40,6 @@ class LegacyConstraintViolationBuilder implements ConstraintViolationBuilderInte
*/ */
private $parameters; private $parameters;
/**
* @var mixed
*/
private $root;
/** /**
* @var mixed * @var mixed
*/ */
@ -70,7 +65,6 @@ class LegacyConstraintViolationBuilder implements ConstraintViolationBuilderInte
$this->context = $context; $this->context = $context;
$this->message = $message; $this->message = $message;
$this->parameters = $parameters; $this->parameters = $parameters;
$this->root = $context->getRoot();
$this->invalidValue = $context->getValue(); $this->invalidValue = $context->getValue();
} }

View File

@ -115,8 +115,6 @@ class DOMCaster
public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, Stub $stub, $isNested) public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, Stub $stub, $isNested)
{ {
// Commented lines denote properties that exist but are better not dumped for clarity.
$a += array( $a += array(
'nodeName' => $dom->nodeName, 'nodeName' => $dom->nodeName,
'nodeValue' => new CutStub($dom->nodeValue), 'nodeValue' => new CutStub($dom->nodeValue),