Skip to content

Commit a8f5875

Browse files
committed
merged branch hhamon/dead_code_cleanup (PR symfony#3086)
Commits ------- f750e54 [HttpKernel] removed unused local $event variable in Stopwatch::stopSection() method. defdac6 [DependencyInjection] removed unused private property $parameterBag in ResolveParameterPlaceHoldersPass::process() method. 1ad3d86 [DependencyInjection] removed unused $compiler local variable in RepeatedPass::process() method. 7088d94 [DependencyInjection] fixed wrong local variable name in RemoveUnusedDefinitionsPass::process() method. a7f857d [Console] removed unused $position parameter in Shell::autocompleter() method. ef6297a [BrowserKit] removed unused $name variable in CookieJar::allValues() method. Discussion ---------- Dead code cleanup
2 parents 009e6d7 + f750e54 commit a8f5875

File tree

6 files changed

+6
-9
lines changed

6 files changed

+6
-9
lines changed

src/Symfony/Component/BrowserKit/CookieJar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function allValues($uri, $returnsRawValue = false)
149149
continue;
150150
}
151151

152-
foreach ($namedCookies as $name => $cookie) {
152+
foreach ($namedCookies as $cookie) {
153153
if ($cookie->isSecure() && 'https' != $parts['scheme']) {
154154
continue;
155155
}

src/Symfony/Component/Console/Shell.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ protected function getHeader()
107107
/**
108108
* Tries to return autocompletion for the current entered text.
109109
*
110-
* @param string $text The last segment of the entered text
111-
* @param integer $position The current position
110+
* @param string $text The last segment of the entered text
111+
* @return Boolean|array A list of guessed strings or true
112112
*/
113-
private function autocompleter($text, $position)
113+
private function autocompleter($text)
114114
{
115115
$info = readline_info();
116116
$text = substr($info['line_buffer'], 0, $info['end']);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function process(ContainerBuilder $container)
5656
$sourceIds[] = $node->getId();
5757

5858
if ($node->isAlias()) {
59-
$referencingAlias[] = $node->getValue();
59+
$referencingAliases[] = $node->getValue();
6060
}
6161
}
6262
$isReferenced = (count(array_unique($sourceIds)) - count($referencingAliases)) > 0;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public function __construct(array $passes)
5050
*/
5151
public function process(ContainerBuilder $container)
5252
{
53-
$compiler = $container->getCompiler();
5453
$this->repeat = false;
5554
foreach ($this->passes as $pass) {
5655
$pass->process($container);

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
*/
2222
class ResolveParameterPlaceHoldersPass implements CompilerPassInterface
2323
{
24-
private $parameterBag;
25-
2624
/**
2725
* Processes the ContainerBuilder to resolve parameter placeholders.
2826
*

src/Symfony/Component/HttpKernel/Debug/Stopwatch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function startSection()
4646
*/
4747
public function stopSection($id)
4848
{
49-
$event = $this->stop('section');
49+
$this->stop('section');
5050

5151
if ($id) {
5252
$this->sections[$id] = $this->events;

0 commit comments

Comments
 (0)