Skip to content

Commit 052735d

Browse files
committed
minor symfony#14005 CS: Convert double quotes to single quotes (keradus)
This PR was merged into the 2.3 branch. Discussion ---------- CS: Convert double quotes to single quotes | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | N/A Changes generated automatically by upcoming PHP CS Fixer. To keep fabbot.io happy ;) Commits ------- f99c22c CS: Convert double quotes to single quotes
2 parents 9f77776 + f99c22c commit 052735d

File tree

85 files changed

+271
-271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+271
-271
lines changed

src/Symfony/Bridge/Doctrine/Security/User/EntityUserProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ public function refreshUser(UserInterface $user)
8585
// That's the case when the user has been changed by a form with
8686
// validation errors.
8787
if (!$id = $this->metadata->getIdentifierValues($user)) {
88-
throw new \InvalidArgumentException("You cannot refresh a user ".
89-
"from the EntityUserProvider that does not contain an identifier. ".
90-
"The user object has to be serialized with its own identifier ".
91-
"mapped by Doctrine."
88+
throw new \InvalidArgumentException('You cannot refresh a user '.
89+
'from the EntityUserProvider that does not contain an identifier. '.
90+
'The user object has to be serialized with its own identifier '.
91+
'mapped by Doctrine.'
9292
);
9393
}
9494

src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function testCollectQueryCount()
3939
$this->assertEquals(0, $c->getQueryCount());
4040

4141
$queries = array(
42-
array('sql' => "SELECT * FROM table1", 'params' => array(), 'types' => array(), 'executionMS' => 0),
42+
array('sql' => 'SELECT * FROM table1', 'params' => array(), 'types' => array(), 'executionMS' => 0),
4343
);
4444
$c = $this->createCollector($queries);
4545
$c->collect(new Request(), new Response());
@@ -53,15 +53,15 @@ public function testCollectTime()
5353
$this->assertEquals(0, $c->getTime());
5454

5555
$queries = array(
56-
array('sql' => "SELECT * FROM table1", 'params' => array(), 'types' => array(), 'executionMS' => 1),
56+
array('sql' => 'SELECT * FROM table1', 'params' => array(), 'types' => array(), 'executionMS' => 1),
5757
);
5858
$c = $this->createCollector($queries);
5959
$c->collect(new Request(), new Response());
6060
$this->assertEquals(1, $c->getTime());
6161

6262
$queries = array(
63-
array('sql' => "SELECT * FROM table1", 'params' => array(), 'types' => array(), 'executionMS' => 1),
64-
array('sql' => "SELECT * FROM table2", 'params' => array(), 'types' => array(), 'executionMS' => 2),
63+
array('sql' => 'SELECT * FROM table1', 'params' => array(), 'types' => array(), 'executionMS' => 1),
64+
array('sql' => 'SELECT * FROM table2', 'params' => array(), 'types' => array(), 'executionMS' => 2),
6565
);
6666
$c = $this->createCollector($queries);
6767
$c->collect(new Request(), new Response());
@@ -74,7 +74,7 @@ public function testCollectTime()
7474
public function testCollectQueries($param, $types, $expected, $explainable)
7575
{
7676
$queries = array(
77-
array('sql' => "SELECT * FROM table1 WHERE field1 = ?1", 'params' => array($param), 'types' => $types, 'executionMS' => 1),
77+
array('sql' => 'SELECT * FROM table1 WHERE field1 = ?1', 'params' => array($param), 'types' => $types, 'executionMS' => 1),
7878
);
7979
$c = $this->createCollector($queries);
8080
$c->collect(new Request(), new Response());
@@ -90,7 +90,7 @@ public function testCollectQueries($param, $types, $expected, $explainable)
9090
public function testSerialization($param, $types, $expected, $explainable)
9191
{
9292
$queries = array(
93-
array('sql' => "SELECT * FROM table1 WHERE field1 = ?1", 'params' => array($param), 'types' => $types, 'executionMS' => 1),
93+
array('sql' => 'SELECT * FROM table1 WHERE field1 = ?1', 'params' => array($param), 'types' => $types, 'executionMS' => 1),
9494
);
9595
$c = $this->createCollector($queries);
9696
$c->collect(new Request(), new Response());

src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,11 @@ public function testValidateUniquenessWithValidCustomErrorPath()
244244
'message' => 'myMessage',
245245
'fields' => array('name', 'name2'),
246246
'em' => self::EM_NAME,
247-
'errorPath' => "name2",
247+
'errorPath' => 'name2',
248248
));
249249

250-
$entity1 = new DoubleNameEntity(1, 'Foo', "Bar");
251-
$entity2 = new DoubleNameEntity(2, 'Foo', "Bar");
250+
$entity1 = new DoubleNameEntity(1, 'Foo', 'Bar');
251+
$entity2 = new DoubleNameEntity(2, 'Foo', 'Bar');
252252

253253
$this->validator->validate($entity1, $constraint);
254254

@@ -399,7 +399,7 @@ public function testAssociatedCompositeEntity()
399399
'em' => self::EM_NAME,
400400
));
401401

402-
$composite = new CompositeIntIdEntity(1, 1, "test");
402+
$composite = new CompositeIntIdEntity(1, 1, 'test');
403403
$associated = new AssociationEntity();
404404
$associated->composite = $composite;
405405

src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ public function validate($entity, Constraint $constraint)
9898

9999
if (count($relatedId) > 1) {
100100
throw new ConstraintDefinitionException(
101-
"Associated entities are not allowed to have more than one identifier field to be ".
102-
"part of a unique constraint in: ".$class->getName()."#".$fieldName
101+
'Associated entities are not allowed to have more than one identifier field to be '.
102+
'part of a unique constraint in: '.$class->getName().'#'.$fieldName
103103
);
104104
}
105105
$criteria[$fieldName] = array_pop($relatedId);

src/Symfony/Bridge/Propel1/Tests/DataCollector/PropelDataCollectorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function testCollectWithMultipleData()
5151
{
5252
$queries = array(
5353
"time: 0.000 sec | mem: 1.4 MB | connection: default | SET NAMES 'utf8'",
54-
"time: 0.012 sec | mem: 2.4 MB | connection: default | SELECT tags.NAME, image.FILENAME FROM tags LEFT JOIN image ON tags.IMAGEID = image.ID WHERE image.ID = 12",
54+
'time: 0.012 sec | mem: 2.4 MB | connection: default | SELECT tags.NAME, image.FILENAME FROM tags LEFT JOIN image ON tags.IMAGEID = image.ID WHERE image.ID = 12',
5555
"time: 0.012 sec | mem: 2.4 MB | connection: default | INSERT INTO `table` (`some_array`) VALUES ('| 1 | 2 | 3 |')",
5656
);
5757

@@ -66,7 +66,7 @@ public function testCollectWithMultipleData()
6666
'memory' => '1.4 MB',
6767
),
6868
array(
69-
'sql' => "SELECT tags.NAME, image.FILENAME FROM tags LEFT JOIN image ON tags.IMAGEID = image.ID WHERE image.ID = 12",
69+
'sql' => 'SELECT tags.NAME, image.FILENAME FROM tags LEFT JOIN image ON tags.IMAGEID = image.ID WHERE image.ID = 12',
7070
'time' => '0.012 sec',
7171
'connection' => 'default',
7272
'memory' => '2.4 MB',

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function abbrMethod($method)
6565
{
6666
if (false !== strpos($method, '::')) {
6767
list($class, $method) = explode('::', $method, 2);
68-
$result = sprintf("%s::%s()", $this->abbrClass($class), $method);
68+
$result = sprintf('%s::%s()', $this->abbrClass($class), $method);
6969
} elseif ('Closure' === $method) {
7070
$result = sprintf("<abbr title=\"%s\">%s</abbr>", $method, $method);
7171
} else {
@@ -91,7 +91,7 @@ public function formatArgs($args)
9191
$short = array_pop($parts);
9292
$formattedValue = sprintf("<em>object</em>(<abbr title=\"%s\">%s</abbr>)", $item[1], $short);
9393
} elseif ('array' === $item[0]) {
94-
$formattedValue = sprintf("<em>array</em>(%s)", is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
94+
$formattedValue = sprintf('<em>array</em>(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);
9595
} elseif ('string' === $item[0]) {
9696
$formattedValue = sprintf("'%s'", htmlspecialchars($item[1], ENT_QUOTES, $this->charset));
9797
} elseif ('null' === $item[0]) {

src/Symfony/Bridge/Twig/Node/SearchAndRenderBlockNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,6 @@ public function compile(\Twig_Compiler $compiler)
101101
}
102102
}
103103

104-
$compiler->raw(")");
104+
$compiler->raw(')');
105105
}
106106
}

src/Symfony/Bundle/FrameworkBundle/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')) {

src/Symfony/Bundle/FrameworkBundle/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)) {

src/Symfony/Bundle/FrameworkBundle/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]) {

0 commit comments

Comments
 (0)