Skip to content

Commit cfa3e95

Browse files
committed
CS fixes
1 parent 942f7f2 commit cfa3e95

File tree

15 files changed

+35
-38
lines changed

15 files changed

+35
-38
lines changed

src/Symfony/Bridge/Twig/Extension/CodeExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function abbrClass($class)
5858
$parts = explode('\\', $class);
5959
$short = array_pop($parts);
6060

61-
return sprintf("<abbr title=\"%s\">%s</abbr>", $class, $short);
61+
return sprintf('<abbr title="%s">%s</abbr>', $class, $short);
6262
}
6363

6464
public function abbrMethod($method)
@@ -67,9 +67,9 @@ public function abbrMethod($method)
6767
list($class, $method) = explode('::', $method, 2);
6868
$result = sprintf('%s::%s()', $this->abbrClass($class), $method);
6969
} elseif ('Closure' === $method) {
70-
$result = sprintf("<abbr title=\"%s\">%s</abbr>", $method, $method);
70+
$result = sprintf('<abbr title="%s">%s</abbr>', $method, $method);
7171
} else {
72-
$result = sprintf("<abbr title=\"%s\">%s</abbr>()", $method, $method);
72+
$result = sprintf('<abbr title="%s">%s</abbr>()', $method, $method);
7373
}
7474

7575
return $result;
@@ -89,7 +89,7 @@ public function formatArgs($args)
8989
if ('object' === $item[0]) {
9090
$parts = explode('\\', $item[1]);
9191
$short = array_pop($parts);
92-
$formattedValue = sprintf("<em>object</em>(<abbr title=\"%s\">%s</abbr>)", $item[1], $short);
92+
$formattedValue = sprintf('<em>object</em>(<abbr title="%s">%s</abbr>)', $item[1], $short);
9393
} elseif ('array' === $item[0]) {
9494
$formattedValue = sprintf('<em>array</em>(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
9595
} elseif ('string' === $item[0]) {

src/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function abbrClass($class)
5555
$parts = explode('\\', $class);
5656
$short = array_pop($parts);
5757

58-
return sprintf("<abbr title=\"%s\">%s</abbr>", $class, $short);
58+
return sprintf('<abbr title="%s">%s</abbr>', $class, $short);
5959
}
6060

6161
public function abbrMethod($method)
@@ -64,9 +64,9 @@ public function abbrMethod($method)
6464
list($class, $method) = explode('::', $method, 2);
6565
$result = sprintf('%s::%s()', $this->abbrClass($class), $method);
6666
} elseif ('Closure' === $method) {
67-
$result = sprintf("<abbr title=\"%s\">%s</abbr>", $method, $method);
67+
$result = sprintf('<abbr title="%s">%s</abbr>', $method, $method);
6868
} else {
69-
$result = sprintf("<abbr title=\"%s\">%s</abbr>()", $method, $method);
69+
$result = sprintf('<abbr title="%s">%s</abbr>()', $method, $method);
7070
}
7171

7272
return $result;
@@ -86,7 +86,7 @@ public function formatArgs(array $args)
8686
if ('object' === $item[0]) {
8787
$parts = explode('\\', $item[1]);
8888
$short = array_pop($parts);
89-
$formattedValue = sprintf("<em>object</em>(<abbr title=\"%s\">%s</abbr>)", $item[1], $short);
89+
$formattedValue = sprintf('<em>object</em>(<abbr title="%s">%s</abbr>)', $item[1], $short);
9090
} elseif ('array' === $item[0]) {
9191
$formattedValue = sprintf('<em>array</em>(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
9292
} elseif ('string' === $item[0]) {

src/Symfony/Component/Console/Descriptor/TextDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ protected function describeApplication(Application $application, array $options
155155
$messages[] = '';
156156

157157
if ($describedNamespace) {
158-
$messages[] = sprintf("<comment>Available commands for the \"%s\" namespace:</comment>", $describedNamespace);
158+
$messages[] = sprintf('<comment>Available commands for the "%s" namespace:</comment>', $describedNamespace);
159159
} else {
160160
$messages[] = '<comment>Available commands:</comment>';
161161
}

src/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function testLGCharEscaping()
2828

2929
$this->assertEquals('foo<bar', $formatter->format('foo\\<bar'));
3030
$this->assertEquals('<info>some info</info>', $formatter->format('\\<info>some info\\</info>'));
31-
$this->assertEquals("\\<info>some info\\</info>", OutputFormatter::escape('<info>some info</info>'));
31+
$this->assertEquals('\\<info>some info\\</info>', OutputFormatter::escape('<info>some info</info>'));
3232

3333
$this->assertEquals(
3434
"\033[33mSymfony\\Component\\Console does work very well!\033[0m",
@@ -162,7 +162,7 @@ public function testNonStyleTag()
162162
public function testFormatLongString()
163163
{
164164
$formatter = new OutputFormatter(true);
165-
$long = str_repeat("\\", 14000);
165+
$long = str_repeat('\\', 14000);
166166
$this->assertEquals("\033[37;41msome error\033[0m".$long, $formatter->format('<error>some error</error>'.$long));
167167
}
168168

src/Symfony/Component/CssSelector/Parser/TokenStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function getNext()
100100
throw new InternalErrorException('Unexpected token stream end.');
101101
}
102102

103-
return $this->tokens[$this->cursor ++];
103+
return $this->tokens[$this->cursor++];
104104
}
105105

106106
/**

src/Symfony/Component/Debug/ExceptionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ private function abbrClass($class)
278278
{
279279
$parts = explode('\\', $class);
280280

281-
return sprintf("<abbr title=\"%s\">%s</abbr>", $class, array_pop($parts));
281+
return sprintf('<abbr title="%s">%s</abbr>', $class, array_pop($parts));
282282
}
283283

284284
/**

src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ private function addService($id, $definition)
539539
if ($definition->isSynthetic()) {
540540
$return[] = '@throws RuntimeException always since this service is expected to be injected dynamically';
541541
} elseif ($class = $definition->getClass()) {
542-
$return[] = sprintf('@return %s A %s instance.', 0 === strpos($class, '%') ? 'object' : "\\".$class, $class);
542+
$return[] = sprintf('@return %s A %s instance.', 0 === strpos($class, '%') ? 'object' : '\\'.$class, $class);
543543
} elseif ($definition->getFactoryClass()) {
544544
$return[] = sprintf('@return object An instance returned by %s::%s().', $definition->getFactoryClass(), $definition->getFactoryMethod());
545545
} elseif ($definition->getFactoryService()) {
@@ -1231,7 +1231,7 @@ private function dumpValue($value, $interpolate = true)
12311231
}
12321232
}
12331233

1234-
return sprintf("new \\%s(%s)", substr(str_replace('\\\\', '\\', $class), 1, -1), implode(', ', $arguments));
1234+
return sprintf('new \\%s(%s)', substr(str_replace('\\\\', '\\', $class), 1, -1), implode(', ', $arguments));
12351235
} elseif ($value instanceof Variable) {
12361236
return '$'.$value;
12371237
} elseif ($value instanceof Reference) {

src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,21 @@ public function testDumpAnonymousServices()
6565
{
6666
include self::$fixturesPath.'/containers/container11.php';
6767
$dumper = new XmlDumper($container);
68-
$this->assertEquals("<?xml version=\"1.0\" encoding=\"utf-8\"?>
69-
<container xmlns=\"http://symfony.com/schema/dic/services\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd\">
68+
$this->assertEquals('<?xml version="1.0" encoding="utf-8"?>
69+
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
7070
<services>
71-
<service id=\"foo\" class=\"FooClass\">
72-
<argument type=\"service\">
73-
<service class=\"BarClass\">
74-
<argument type=\"service\">
75-
<service class=\"BazClass\"/>
71+
<service id="foo" class="FooClass">
72+
<argument type="service">
73+
<service class="BarClass">
74+
<argument type="service">
75+
<service class="BazClass"/>
7676
</argument>
7777
</service>
7878
</argument>
7979
</service>
8080
</services>
8181
</container>
82-
", $dumper->dump());
82+
', $dumper->dump());
8383
}
8484

8585
public function testDumpEntities()

src/Symfony/Component/DependencyInjection/Tests/Loader/PhpFileLoaderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\DependencyInjection\Tests\Loader;
1313

1414
use Symfony\Component\DependencyInjection\ContainerBuilder;
15-
use Symfony\Component\Config\Loader\Loader;
1615
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
1716
use Symfony\Component\Config\FileLocator;
1817

src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Symfony\Component\DependencyInjection\ContainerInterface;
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
1616
use Symfony\Component\DependencyInjection\Reference;
17-
use Symfony\Component\Config\Loader\Loader;
1817
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
1918
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
2019
use Symfony\Component\DependencyInjection\Loader\IniFileLoader;

0 commit comments

Comments
 (0)