diff --git a/src/Symfony/Bridge/Twig/Extension/CodeExtension.php b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php
index b5f619d327..bf210c63a5 100644
--- a/src/Symfony/Bridge/Twig/Extension/CodeExtension.php
+++ b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php
@@ -58,7 +58,7 @@ class CodeExtension extends \Twig_Extension
$parts = explode('\\', $class);
$short = array_pop($parts);
- return sprintf("%s", $class, $short);
+ return sprintf('%s', $class, $short);
}
public function abbrMethod($method)
@@ -67,9 +67,9 @@ class CodeExtension extends \Twig_Extension
list($class, $method) = explode('::', $method, 2);
$result = sprintf('%s::%s()', $this->abbrClass($class), $method);
} elseif ('Closure' === $method) {
- $result = sprintf("%s", $method, $method);
+ $result = sprintf('%s', $method, $method);
} else {
- $result = sprintf("%s()", $method, $method);
+ $result = sprintf('%s()', $method, $method);
}
return $result;
@@ -89,7 +89,7 @@ class CodeExtension extends \Twig_Extension
if ('object' === $item[0]) {
$parts = explode('\\', $item[1]);
$short = array_pop($parts);
- $formattedValue = sprintf("object(%s)", $item[1], $short);
+ $formattedValue = sprintf('object(%s)', $item[1], $short);
} elseif ('array' === $item[0]) {
$formattedValue = sprintf('array(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
} elseif ('string' === $item[0]) {
diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php
index e7042e0dc3..2c79ca3526 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php
@@ -55,7 +55,7 @@ class CodeHelper extends Helper
$parts = explode('\\', $class);
$short = array_pop($parts);
- return sprintf("%s", $class, $short);
+ return sprintf('%s', $class, $short);
}
public function abbrMethod($method)
@@ -64,9 +64,9 @@ class CodeHelper extends Helper
list($class, $method) = explode('::', $method, 2);
$result = sprintf('%s::%s()', $this->abbrClass($class), $method);
} elseif ('Closure' === $method) {
- $result = sprintf("%s", $method, $method);
+ $result = sprintf('%s', $method, $method);
} else {
- $result = sprintf("%s()", $method, $method);
+ $result = sprintf('%s()', $method, $method);
}
return $result;
@@ -86,7 +86,7 @@ class CodeHelper extends Helper
if ('object' === $item[0]) {
$parts = explode('\\', $item[1]);
$short = array_pop($parts);
- $formattedValue = sprintf("object(%s)", $item[1], $short);
+ $formattedValue = sprintf('object(%s)', $item[1], $short);
} elseif ('array' === $item[0]) {
$formattedValue = sprintf('array(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
} elseif ('string' === $item[0]) {
diff --git a/src/Symfony/Component/Console/Descriptor/TextDescriptor.php b/src/Symfony/Component/Console/Descriptor/TextDescriptor.php
index 6a51519f7b..fffd0e8486 100644
--- a/src/Symfony/Component/Console/Descriptor/TextDescriptor.php
+++ b/src/Symfony/Component/Console/Descriptor/TextDescriptor.php
@@ -155,7 +155,7 @@ class TextDescriptor extends Descriptor
$messages[] = '';
if ($describedNamespace) {
- $messages[] = sprintf("Available commands for the \"%s\" namespace:", $describedNamespace);
+ $messages[] = sprintf('Available commands for the "%s" namespace:', $describedNamespace);
} else {
$messages[] = 'Available commands:';
}
diff --git a/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php b/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
index 9856760c11..3542680a88 100644
--- a/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
+++ b/src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php
@@ -28,7 +28,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('fooformat('foo\\assertEquals('some info', $formatter->format('\\some info\\'));
- $this->assertEquals("\\some info\\", OutputFormatter::escape('some info'));
+ $this->assertEquals('\\some info\\', OutputFormatter::escape('some info'));
$this->assertEquals(
"\033[33mSymfony\\Component\\Console does work very well!\033[0m",
@@ -162,7 +162,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase
public function testFormatLongString()
{
$formatter = new OutputFormatter(true);
- $long = str_repeat("\\", 14000);
+ $long = str_repeat('\\', 14000);
$this->assertEquals("\033[37;41msome error\033[0m".$long, $formatter->format('some error'.$long));
}
diff --git a/src/Symfony/Component/CssSelector/Parser/TokenStream.php b/src/Symfony/Component/CssSelector/Parser/TokenStream.php
index 8184b832b3..c0525d7a83 100644
--- a/src/Symfony/Component/CssSelector/Parser/TokenStream.php
+++ b/src/Symfony/Component/CssSelector/Parser/TokenStream.php
@@ -100,7 +100,7 @@ class TokenStream
throw new InternalErrorException('Unexpected token stream end.');
}
- return $this->tokens[$this->cursor ++];
+ return $this->tokens[$this->cursor++];
}
/**
diff --git a/src/Symfony/Component/Debug/ExceptionHandler.php b/src/Symfony/Component/Debug/ExceptionHandler.php
index 6d55d8afa3..a96bbe1020 100644
--- a/src/Symfony/Component/Debug/ExceptionHandler.php
+++ b/src/Symfony/Component/Debug/ExceptionHandler.php
@@ -278,7 +278,7 @@ EOF;
{
$parts = explode('\\', $class);
- return sprintf("%s", $class, array_pop($parts));
+ return sprintf('%s', $class, array_pop($parts));
}
/**
diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
index 3b9039d29c..385400dac6 100644
--- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
+++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
@@ -539,7 +539,7 @@ class PhpDumper extends Dumper
if ($definition->isSynthetic()) {
$return[] = '@throws RuntimeException always since this service is expected to be injected dynamically';
} elseif ($class = $definition->getClass()) {
- $return[] = sprintf('@return %s A %s instance.', 0 === strpos($class, '%') ? 'object' : "\\".$class, $class);
+ $return[] = sprintf('@return %s A %s instance.', 0 === strpos($class, '%') ? 'object' : '\\'.$class, $class);
} elseif ($definition->getFactoryClass()) {
$return[] = sprintf('@return object An instance returned by %s::%s().', $definition->getFactoryClass(), $definition->getFactoryMethod());
} elseif ($definition->getFactoryService()) {
@@ -1231,7 +1231,7 @@ EOF;
}
}
- return sprintf("new \\%s(%s)", substr(str_replace('\\\\', '\\', $class), 1, -1), implode(', ', $arguments));
+ return sprintf('new \\%s(%s)', substr(str_replace('\\\\', '\\', $class), 1, -1), implode(', ', $arguments));
} elseif ($value instanceof Variable) {
return '$'.$value;
} elseif ($value instanceof Reference) {
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php
index 9dc41dcd09..1e00f83215 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php
@@ -65,21 +65,21 @@ class XmlDumperTest extends \PHPUnit_Framework_TestCase
{
include self::$fixturesPath.'/containers/container11.php';
$dumper = new XmlDumper($container);
- $this->assertEquals("
-
+ $this->assertEquals('
+
-
-
-
-
-
+
+
+
+
+
-", $dumper->dump());
+', $dumper->dump());
}
public function testDumpEntities()
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php
index 505f710cbe..5ae097ca7d 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php
@@ -12,7 +12,6 @@
namespace Symfony\Component\DependencyInjection\Tests\Loader;
use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\Config\Loader\Loader;
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
use Symfony\Component\Config\FileLocator;
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
index 4a10654bb7..9c6fd2bdd6 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
@@ -14,7 +14,6 @@ namespace Symfony\Component\DependencyInjection\Tests\Loader;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\Config\Loader\Loader;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\DependencyInjection\Loader\IniFileLoader;
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
index f10ecb04d0..c3ff984b40 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
@@ -13,7 +13,6 @@ namespace Symfony\Component\DependencyInjection\Tests\Loader;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
-use Symfony\Component\Config\Loader\Loader;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\DependencyInjection\Loader\IniFileLoader;
diff --git a/src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php b/src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php
index c7a3edb890..5ef85bad27 100644
--- a/src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php
@@ -98,8 +98,8 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase
$tdispatcher->addListener('foo', $listener1 = function () {; });
$tdispatcher->addListener('foo', $listener2 = function () {; });
- $logger->expects($this->at(0))->method('debug')->with("Notified event \"foo\" to listener \"closure\".");
- $logger->expects($this->at(1))->method('debug')->with("Notified event \"foo\" to listener \"closure\".");
+ $logger->expects($this->at(0))->method('debug')->with('Notified event "foo" to listener "closure".');
+ $logger->expects($this->at(1))->method('debug')->with('Notified event "foo" to listener "closure".');
$tdispatcher->dispatch('foo');
}
@@ -113,9 +113,9 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase
$tdispatcher->addListener('foo', $listener1 = function (Event $event) { $event->stopPropagation(); });
$tdispatcher->addListener('foo', $listener2 = function () {; });
- $logger->expects($this->at(0))->method('debug')->with("Notified event \"foo\" to listener \"closure\".");
- $logger->expects($this->at(1))->method('debug')->with("Listener \"closure\" stopped propagation of the event \"foo\".");
- $logger->expects($this->at(2))->method('debug')->with("Listener \"closure\" was not called for event \"foo\".");
+ $logger->expects($this->at(0))->method('debug')->with('Notified event "foo" to listener "closure".');
+ $logger->expects($this->at(1))->method('debug')->with('Listener "closure" stopped propagation of the event "foo".');
+ $logger->expects($this->at(2))->method('debug')->with('Listener "closure" was not called for event "foo".');
$tdispatcher->dispatch('foo');
}
diff --git a/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php
index ea85e776a8..358c3c7a7c 100644
--- a/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php
+++ b/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php
@@ -162,7 +162,7 @@ class DigestData
public function getUsername()
{
- return strtr($this->elements['username'], array("\\\"" => "\"", "\\\\" => "\\"));
+ return strtr($this->elements['username'], array('\\"' => '"', '\\\\' => '\\'));
}
public function validateAndDecode($entryPointKey, $expectedRealm)
diff --git a/src/Symfony/Component/Yaml/Escaper.php b/src/Symfony/Component/Yaml/Escaper.php
index f4987652aa..ac325a2c2f 100644
--- a/src/Symfony/Component/Yaml/Escaper.php
+++ b/src/Symfony/Component/Yaml/Escaper.php
@@ -33,11 +33,11 @@ class Escaper
"\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f",
"\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9",);
private static $escaped = array('\\\\', '\\"', '\\\\', '\\"',
- "\\0", "\\x01", "\\x02", "\\x03", "\\x04", "\\x05", "\\x06", "\\a",
- "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "\\x0e", "\\x0f",
- "\\x10", "\\x11", "\\x12", "\\x13", "\\x14", "\\x15", "\\x16", "\\x17",
- "\\x18", "\\x19", "\\x1a", "\\e", "\\x1c", "\\x1d", "\\x1e", "\\x1f",
- "\\N", "\\_", "\\L", "\\P",);
+ '\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a',
+ '\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f',
+ '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17',
+ '\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f',
+ '\\N', '\\_', '\\L', '\\P',);
/**
* Determines if a PHP value would require double quoting in YAML.
diff --git a/src/Symfony/Component/Yaml/Tests/InlineTest.php b/src/Symfony/Component/Yaml/Tests/InlineTest.php
index d3329bc2f1..bd8147b3c9 100644
--- a/src/Symfony/Component/Yaml/Tests/InlineTest.php
+++ b/src/Symfony/Component/Yaml/Tests/InlineTest.php
@@ -218,7 +218,7 @@ class InlineTest extends \PHPUnit_Framework_TestCase
'{ foo : bar, bar : foo, false : false, null : null, integer : 12 }' => array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12),
'{foo: \'bar\', bar: \'foo: bar\'}' => array('foo' => 'bar', 'bar' => 'foo: bar'),
'{\'foo\': \'bar\', "bar": \'foo: bar\'}' => array('foo' => 'bar', 'bar' => 'foo: bar'),
- '{\'foo\'\'\': \'bar\', "bar\"": \'foo: bar\'}' => array('foo\'' => 'bar', "bar\"" => 'foo: bar'),
+ '{\'foo\'\'\': \'bar\', "bar\"": \'foo: bar\'}' => array('foo\'' => 'bar', 'bar"' => 'foo: bar'),
'{\'foo: \': \'bar\', "bar: ": \'foo: bar\'}' => array('foo: ' => 'bar', 'bar: ' => 'foo: bar'),
// nested sequences and mappings