Skip to content

Commit 8892cf0

Browse files
committed
minor symfony#13488 [2.3] Removed dead code and various cleaning (saro0h)
This PR was merged into the 2.3 branch. Discussion ---------- [2.3] Removed dead code and various cleaning | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ Commits ------- 50973ba Removed dead code and various cleaning
2 parents aa0bf6c + 50973ba commit 8892cf0

File tree

12 files changed

+12
-45
lines changed

12 files changed

+12
-45
lines changed

src/Symfony/Bridge/Twig/NodeVisitor/Scope.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ class Scope
2121
*/
2222
private $parent;
2323

24-
/**
25-
* @var Scope[]
26-
*/
27-
private $children;
28-
2924
/**
3025
* @var array
3126
*/
@@ -53,10 +48,7 @@ public function __construct(Scope $parent = null)
5348
*/
5449
public function enter()
5550
{
56-
$child = new self($this);
57-
$this->children[] = $child;
58-
59-
return $child;
51+
return new self($this);
6052
}
6153

6254
/**

src/Symfony/Component/Console/Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,8 +754,8 @@ public function renderException($e, $output)
754754
$trace = $e->getTrace();
755755
array_unshift($trace, array(
756756
'function' => '',
757-
'file' => $e->getFile() != null ? $e->getFile() : 'n/a',
758-
'line' => $e->getLine() != null ? $e->getLine() : 'n/a',
757+
'file' => $e->getFile() !== null ? $e->getFile() : 'n/a',
758+
'line' => $e->getLine() !== null ? $e->getLine() : 'n/a',
759759
'args' => array(),
760760
));
761761

src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
*/
2727
class CheckCircularReferencesPass implements CompilerPassInterface
2828
{
29-
private $currentId;
3029
private $currentPath;
3130
private $checkedNodes;
3231

@@ -41,7 +40,6 @@ public function process(ContainerBuilder $container)
4140

4241
$this->checkedNodes = array();
4342
foreach ($graph->getNodes() as $id => $node) {
44-
$this->currentId = $id;
4543
$this->currentPath = array($id);
4644

4745
$this->checkOutEdges($node->getOutEdges());

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ public function duplicate(array $query = null, array $request = null, array $att
446446
}
447447

448448
if (!$dup->getRequestFormat(null)) {
449-
$dup->setRequestFormat($format = $this->getRequestFormat(null));
449+
$dup->setRequestFormat($this->getRequestFormat(null));
450450
}
451451

452452
return $dup;

src/Symfony/Component/Intl/Intl.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -264,20 +264,6 @@ private static function getEntryReader()
264264
return self::$entryReader;
265265
}
266266

267-
/**
268-
* Resets the internal state.
269-
*/
270-
private static function reset()
271-
{
272-
self::$currencyBundle = null;
273-
self::$languageBundle = null;
274-
self::$localeBundle = null;
275-
self::$regionBundle = null;
276-
self::$icuVersion = false;
277-
self::$icuDataVersion = false;
278-
self::$entryReader = null;
279-
}
280-
281267
/**
282268
* This class must not be instantiated.
283269
*/

src/Symfony/Component/Process/Process.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,8 +1040,7 @@ protected function buildCallback($callback)
10401040
{
10411041
$that = $this;
10421042
$out = self::OUT;
1043-
$err = self::ERR;
1044-
$callback = function ($type, $data) use ($that, $callback, $out, $err) {
1043+
$callback = function ($type, $data) use ($that, $callback, $out) {
10451044
if ($out == $type) {
10461045
$that->addOutput($data);
10471046
} else {

src/Symfony/Component/PropertyAccess/PropertyPath.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ public function __construct($propertyPath)
109109
$element = $matches[3];
110110
$this->isIndex[] = true;
111111
}
112-
// Disabled this behaviour as the syntax is not yet final
113-
//$pos = strpos($element, self::SINGULAR_SEPARATOR);
112+
114113
$pos = false;
115114
$singular = null;
116115

@@ -131,7 +130,7 @@ public function __construct($propertyPath)
131130
throw new InvalidPropertyPathException(sprintf(
132131
'Could not parse property path "%s". Unexpected token "%s" at position %d',
133132
$propertyPath,
134-
$remaining{0},
133+
$remaining[0],
135134
$position
136135
));
137136
}

src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,6 @@ private function updateNewAceProperty($name, array $changes)
863863

864864
$sids = new \SplObjectStorage();
865865
$classIds = new \SplObjectStorage();
866-
$currentIds = array();
867866
for ($i = 0, $c = count($new); $i<$c; $i++) {
868867
$ace = $new[$i];
869868

@@ -890,8 +889,6 @@ private function updateNewAceProperty($name, array $changes)
890889
$aceIdProperty = new \ReflectionProperty($ace, 'id');
891890
$aceIdProperty->setAccessible(true);
892891
$aceIdProperty->setValue($ace, intval($aceId));
893-
} else {
894-
$currentIds[$ace->getId()] = true;
895892
}
896893
}
897894
}

src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,7 @@ public function authenticate(TokenInterface $token)
5959
if (!$user = $token->getUser()) {
6060
throw new BadCredentialsException('No pre-authenticated principal found in request.');
6161
}
62-
/*
63-
if (null === $token->getCredentials()) {
64-
throw new BadCredentialsException('No pre-authenticated credentials found in request.');
65-
}
66-
*/
62+
6763
$user = $this->userProvider->loadUserByUsername($user);
6864

6965
$this->userChecker->checkPostAuth($user);

src/Symfony/Component/Security/Http/Firewall/AccessListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function handle(GetResponseEvent $event)
5555

5656
$request = $event->getRequest();
5757

58-
list($attributes, $channel) = $this->map->getPatterns($request);
58+
list($attributes) = $this->map->getPatterns($request);
5959

6060
if (null === $attributes) {
6161
return;

0 commit comments

Comments
 (0)