merged branch hhamon/dead_code_cleanup (PR #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
This commit is contained in:
Fabien Potencier 2012-01-10 22:18:59 +01:00
commit a8f5875292
6 changed files with 6 additions and 9 deletions

View File

@ -149,7 +149,7 @@ class CookieJar
continue;
}
foreach ($namedCookies as $name => $cookie) {
foreach ($namedCookies as $cookie) {
if ($cookie->isSecure() && 'https' != $parts['scheme']) {
continue;
}

View File

@ -107,10 +107,10 @@ EOF;
/**
* Tries to return autocompletion for the current entered text.
*
* @param string $text The last segment of the entered text
* @param integer $position The current position
* @param string $text The last segment of the entered text
* @return Boolean|array A list of guessed strings or true
*/
private function autocompleter($text, $position)
private function autocompleter($text)
{
$info = readline_info();
$text = substr($info['line_buffer'], 0, $info['end']);

View File

@ -56,7 +56,7 @@ class RemoveUnusedDefinitionsPass implements RepeatablePassInterface
$sourceIds[] = $node->getId();
if ($node->isAlias()) {
$referencingAlias[] = $node->getValue();
$referencingAliases[] = $node->getValue();
}
}
$isReferenced = (count(array_unique($sourceIds)) - count($referencingAliases)) > 0;

View File

@ -50,7 +50,6 @@ class RepeatedPass implements CompilerPassInterface
*/
public function process(ContainerBuilder $container)
{
$compiler = $container->getCompiler();
$this->repeat = false;
foreach ($this->passes as $pass) {
$pass->process($container);

View File

@ -21,8 +21,6 @@ use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
*/
class ResolveParameterPlaceHoldersPass implements CompilerPassInterface
{
private $parameterBag;
/**
* Processes the ContainerBuilder to resolve parameter placeholders.
*

View File

@ -46,7 +46,7 @@ class Stopwatch
*/
public function stopSection($id)
{
$event = $this->stop('section');
$this->stop('section');
if ($id) {
$this->sections[$id] = $this->events;