Skip to content

Commit 84628b0

Browse files
committed
CS: Convert double quotes to single quotes
1 parent 51068ac commit 84628b0

File tree

9 files changed

+36
-36
lines changed

9 files changed

+36
-36
lines changed

Command/AssetsInstallCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8383
$bundlesDir = $targetArg.'/bundles/';
8484
$filesystem->mkdir($bundlesDir, 0777);
8585

86-
$output->writeln(sprintf("Installing assets using the <comment>%s</comment> option", $input->getOption('symlink') ? 'symlink' : 'hard copy'));
86+
$output->writeln(sprintf('Installing assets using the <comment>%s</comment> option', $input->getOption('symlink') ? 'symlink' : 'hard copy'));
8787

8888
foreach ($this->getContainer()->get('kernel')->getBundles() as $bundle) {
8989
if (is_dir($originDir = $bundle->getPath().'/Resources/public')) {

Command/ContainerDebugCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,12 +207,12 @@ protected function outputServices(OutputInterface $output, $serviceIds, $showPri
207207
}
208208
}
209209
$format = '%-'.$maxName.'s ';
210-
$format .= implode("", array_map(function ($length) { return "%-{$length}s "; }, $maxTags));
210+
$format .= implode('', array_map(function ($length) { return "%-{$length}s "; }, $maxTags));
211211
$format .= '%-'.$maxScope.'s %s';
212212

213213
// the title field needs extra space to make up for comment tags
214214
$format1 = '%-'.($maxName + 19).'s ';
215-
$format1 .= implode("", array_map(function ($length) { return '%-'.($length + 19).'s '; }, $maxTags));
215+
$format1 .= implode('', array_map(function ($length) { return '%-'.($length + 19).'s '; }, $maxTags));
216216
$format1 .= '%-'.($maxScope + 19).'s %s';
217217

218218
$tags = array();
@@ -230,7 +230,7 @@ protected function outputServices(OutputInterface $output, $serviceIds, $showPri
230230
foreach ($definition->getTag($showTagAttributes) as $key => $tag) {
231231
$tagValues = array();
232232
foreach (array_keys($maxTags) as $tagName) {
233-
$tagValues[] = isset($tag[$tagName]) ? $tag[$tagName] : "";
233+
$tagValues[] = isset($tag[$tagName]) ? $tag[$tagName] : '';
234234
}
235235
if (0 === $key) {
236236
$lines[] = $this->buildArgumentsArray($serviceId, $definition->getScope(), $definition->getClass(), $tagValues);
@@ -247,11 +247,11 @@ protected function outputServices(OutputInterface $output, $serviceIds, $showPri
247247
}
248248
} elseif ($definition instanceof Alias) {
249249
$alias = $definition;
250-
$output->writeln(vsprintf($format, $this->buildArgumentsArray($serviceId, 'n/a', sprintf('<comment>alias for</comment> <info>%s</info>', (string) $alias), count($maxTags) ? array_fill(0, count($maxTags), "") : array())));
250+
$output->writeln(vsprintf($format, $this->buildArgumentsArray($serviceId, 'n/a', sprintf('<comment>alias for</comment> <info>%s</info>', (string) $alias), count($maxTags) ? array_fill(0, count($maxTags), '') : array())));
251251
} else {
252252
// we have no information (happens with "service_container")
253253
$service = $definition;
254-
$output->writeln(vsprintf($format, $this->buildArgumentsArray($serviceId, '', get_class($service), count($maxTags) ? array_fill(0, count($maxTags), "") : array())));
254+
$output->writeln(vsprintf($format, $this->buildArgumentsArray($serviceId, '', get_class($service), count($maxTags) ? array_fill(0, count($maxTags), '') : array())));
255255
}
256256
}
257257
}
@@ -281,7 +281,7 @@ protected function outputService(OutputInterface $output, $serviceId)
281281

282282
if ($definition instanceof Definition) {
283283
$output->writeln(sprintf('<comment>Service Id</comment> %s', $serviceId));
284-
$output->writeln(sprintf('<comment>Class</comment> %s', $definition->getClass() ?: "-"));
284+
$output->writeln(sprintf('<comment>Class</comment> %s', $definition->getClass() ?: '-'));
285285

286286
$tags = $definition->getTags();
287287
if (count($tags)) {

Templating/Helper/CodeHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function abbrMethod($method)
6262
{
6363
if (false !== strpos($method, '::')) {
6464
list($class, $method) = explode('::', $method, 2);
65-
$result = sprintf("%s::%s()", $this->abbrClass($class), $method);
65+
$result = sprintf('%s::%s()', $this->abbrClass($class), $method);
6666
} elseif ('Closure' === $method) {
6767
$result = sprintf("<abbr title=\"%s\">%s</abbr>", $method, $method);
6868
} else {
@@ -88,7 +88,7 @@ public function formatArgs(array $args)
8888
$short = array_pop($parts);
8989
$formattedValue = sprintf("<em>object</em>(<abbr title=\"%s\">%s</abbr>)", $item[1], $short);
9090
} elseif ('array' === $item[0]) {
91-
$formattedValue = sprintf("<em>array</em>(%s)", is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
91+
$formattedValue = sprintf('<em>array</em>(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
9292
} elseif ('string' === $item[0]) {
9393
$formattedValue = sprintf("'%s'", htmlspecialchars($item[1], ENT_QUOTES, $this->getCharset()));
9494
} elseif ('null' === $item[0]) {

Templating/Loader/TemplateLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected function getCacheKey($template)
6666
public function locate($template, $currentPath = null, $first = true)
6767
{
6868
if (!$template instanceof TemplateReferenceInterface) {
69-
throw new \InvalidArgumentException("The template must be an instance of TemplateReferenceInterface.");
69+
throw new \InvalidArgumentException('The template must be an instance of TemplateReferenceInterface.');
7070
}
7171

7272
$key = $this->getCacheKey($template);

Tests/Controller/RedirectControllerTest.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -155,30 +155,30 @@ public function urlRedirectProvider()
155155
{
156156
return array(
157157
// Standard ports
158-
array('http', null, null, 'http', 80, ""),
159-
array('http', 80, null, 'http', 80, ""),
160-
array('https', null, null, 'http', 80, ""),
161-
array('https', 80, null, 'http', 80, ""),
158+
array('http', null, null, 'http', 80, ''),
159+
array('http', 80, null, 'http', 80, ''),
160+
array('https', null, null, 'http', 80, ''),
161+
array('https', 80, null, 'http', 80, ''),
162162

163-
array('http', null, null, 'https', 443, ""),
164-
array('http', null, 443, 'https', 443, ""),
165-
array('https', null, null, 'https', 443, ""),
166-
array('https', null, 443, 'https', 443, ""),
163+
array('http', null, null, 'https', 443, ''),
164+
array('http', null, 443, 'https', 443, ''),
165+
array('https', null, null, 'https', 443, ''),
166+
array('https', null, 443, 'https', 443, ''),
167167

168168
// Non-standard ports
169-
array('http', null, null, 'http', 8080, ":8080"),
170-
array('http', 4080, null, 'http', 8080, ":4080"),
171-
array('http', 80, null, 'http', 8080, ""),
172-
array('https', null, null, 'http', 8080, ""),
173-
array('https', null, 8443, 'http', 8080, ":8443"),
174-
array('https', null, 443, 'http', 8080, ""),
175-
176-
array('https', null, null, 'https', 8443, ":8443"),
177-
array('https', null, 4443, 'https', 8443, ":4443"),
178-
array('https', null, 443, 'https', 8443, ""),
179-
array('http', null, null, 'https', 8443, ""),
180-
array('http', 8080, 4443, 'https', 8443, ":8080"),
181-
array('http', 80, 4443, 'https', 8443, ""),
169+
array('http', null, null, 'http', 8080, ':8080'),
170+
array('http', 4080, null, 'http', 8080, ':4080'),
171+
array('http', 80, null, 'http', 8080, ''),
172+
array('https', null, null, 'http', 8080, ''),
173+
array('https', null, 8443, 'http', 8080, ':8443'),
174+
array('https', null, 443, 'http', 8080, ''),
175+
176+
array('https', null, null, 'https', 8443, ':8443'),
177+
array('https', null, 4443, 'https', 8443, ':4443'),
178+
array('https', null, 443, 'https', 8443, ''),
179+
array('http', null, null, 'https', 8443, ''),
180+
array('http', 8080, 4443, 'https', 8443, ':8080'),
181+
array('http', 80, 4443, 'https', 8443, ''),
182182
);
183183
}
184184

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public function testValidationAnnotations()
273273

274274
public function testValidationPaths()
275275
{
276-
require_once __DIR__."/Fixtures/TestBundle/TestBundle.php";
276+
require_once __DIR__.'/Fixtures/TestBundle/TestBundle.php';
277277

278278
$container = $this->createContainerFromFile('validation_annotations', array(
279279
'kernel.bundles' => array('TestBundle' => 'Symfony\Bundle\FrameworkBundle\Tests\TestBundle'),

Tests/Templating/Helper/FormHelperDivLayoutTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected function renderForm(FormView $view, array $vars = array())
6565
protected function renderEnctype(FormView $view)
6666
{
6767
if (!method_exists($form = $this->engine->get('form'), 'enctype')) {
68-
$this->markTestSkipped(sprintf("Deprecated method %s->enctype() is not implemented.", get_class($form)));
68+
$this->markTestSkipped(sprintf('Deprecated method %s->enctype() is not implemented.', get_class($form)));
6969
}
7070

7171
return (string) $form->enctype($view);

Tests/Templating/Helper/FormHelperTableLayoutTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected function renderForm(FormView $view, array $vars = array())
6666
protected function renderEnctype(FormView $view)
6767
{
6868
if (!method_exists($form = $this->engine->get('form'), 'enctype')) {
69-
$this->markTestSkipped(sprintf("Deprecated method %s->enctype() is not implemented.", get_class($form)));
69+
$this->markTestSkipped(sprintf('Deprecated method %s->enctype() is not implemented.', get_class($form)));
7070
}
7171

7272
return (string) $form->enctype($view);

Tests/Translation/PhpExtractorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public function testExtraction()
4242
"double-quoted key with whitespace and escaped \$\n\" sequences" => "prefixdouble-quoted key with whitespace and escaped \$\n\" sequences",
4343
'single-quoted key with whitespace and nonescaped \$\n\' sequences' => 'prefixsingle-quoted key with whitespace and nonescaped \$\n\' sequences',
4444
'single-quoted key with "quote mark at the end"' => 'prefixsingle-quoted key with "quote mark at the end"',
45-
$expectedHeredoc => "prefix".$expectedHeredoc,
46-
$expectedNowdoc => "prefix".$expectedNowdoc,
45+
$expectedHeredoc => 'prefix'.$expectedHeredoc,
46+
$expectedNowdoc => 'prefix'.$expectedNowdoc,
4747
'{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples' => 'prefix{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples',
4848
));
4949
$actualCatalogue = $catalogue->all();

0 commit comments

Comments
 (0)