Skip to content

Commit b776d48

Browse files
committed
CS: Convert double quotes to single quotes
1 parent e90f4bc commit b776d48

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

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()) {
@@ -1225,7 +1225,7 @@ private function dumpValue($value, $interpolate = true)
12251225
} elseif (null !== $value->getFactoryService()) {
12261226
$service = $this->dumpValue($value->getFactoryService());
12271227

1228-
return sprintf("%s->%s(%s)", 0 === strpos($service, '$') ? sprintf('$this->get(%s)', $service) : $this->getServiceCall($value->getFactoryService()), $value->getFactoryMethod(), implode(', ', $arguments));
1228+
return sprintf('%s->%s(%s)', 0 === strpos($service, '$') ? sprintf('$this->get(%s)', $service) : $this->getServiceCall($value->getFactoryService()), $value->getFactoryMethod(), implode(', ', $arguments));
12291229
} else {
12301230
throw new RuntimeException('Cannot dump definitions which have factory method without factory service or factory class.');
12311231
}

Tests/DefinitionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public function testSetGetFactoryClass()
3131
{
3232
$def = new Definition('stdClass');
3333
$this->assertNull($def->getFactoryClass());
34-
$this->assertSame($def, $def->setFactoryClass('stdClass2'), "->setFactoryClass() implements a fluent interface.");
35-
$this->assertEquals('stdClass2', $def->getFactoryClass(), "->getFactoryClass() returns current class to construct this service.");
34+
$this->assertSame($def, $def->setFactoryClass('stdClass2'), '->setFactoryClass() implements a fluent interface.');
35+
$this->assertEquals('stdClass2', $def->getFactoryClass(), '->getFactoryClass() returns current class to construct this service.');
3636
}
3737

3838
public function testSetGetFactoryMethod()
@@ -47,8 +47,8 @@ public function testSetGetFactoryService()
4747
{
4848
$def = new Definition('stdClass');
4949
$this->assertNull($def->getFactoryService());
50-
$this->assertSame($def, $def->setFactoryService('foo.bar'), "->setFactoryService() implements a fluent interface.");
51-
$this->assertEquals('foo.bar', $def->getFactoryService(), "->getFactoryService() returns current service to construct this service.");
50+
$this->assertSame($def, $def->setFactoryService('foo.bar'), '->setFactoryService() implements a fluent interface.');
51+
$this->assertEquals('foo.bar', $def->getFactoryService(), '->getFactoryService() returns current service to construct this service.');
5252
}
5353

5454
/**

Tests/Dumper/PhpDumperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ public function testDumpOptimizationString()
6363
'.' => 'dot as a key',
6464
'.\'\'.' => 'concatenation as a key',
6565
'\'\'.' => 'concatenation from the start key',
66-
'optimize concatenation' => "string1%some_string%string2",
67-
'optimize concatenation with empty string' => "string1%empty_value%string2",
66+
'optimize concatenation' => 'string1%some_string%string2',
67+
'optimize concatenation with empty string' => 'string1%empty_value%string2',
6868
'optimize concatenation from the start' => '%empty_value%start',
6969
'optimize concatenation at the end' => 'end%empty_value%',
7070
));

Tests/Loader/XmlFileLoaderTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,31 +210,31 @@ public function testParsesTags()
210210

211211
public function testConvertDomElementToArray()
212212
{
213-
$doc = new \DOMDocument("1.0");
213+
$doc = new \DOMDocument('1.0');
214214
$doc->loadXML('<foo>bar</foo>');
215215
$this->assertEquals('bar', XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
216216

217-
$doc = new \DOMDocument("1.0");
217+
$doc = new \DOMDocument('1.0');
218218
$doc->loadXML('<foo foo="bar" />');
219219
$this->assertEquals(array('foo' => 'bar'), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
220220

221-
$doc = new \DOMDocument("1.0");
221+
$doc = new \DOMDocument('1.0');
222222
$doc->loadXML('<foo><foo>bar</foo></foo>');
223223
$this->assertEquals(array('foo' => 'bar'), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
224224

225-
$doc = new \DOMDocument("1.0");
225+
$doc = new \DOMDocument('1.0');
226226
$doc->loadXML('<foo><foo>bar<foo>bar</foo></foo></foo>');
227227
$this->assertEquals(array('foo' => array('value' => 'bar', 'foo' => 'bar')), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
228228

229-
$doc = new \DOMDocument("1.0");
229+
$doc = new \DOMDocument('1.0');
230230
$doc->loadXML('<foo><foo></foo></foo>');
231231
$this->assertEquals(array('foo' => null), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
232232

233-
$doc = new \DOMDocument("1.0");
233+
$doc = new \DOMDocument('1.0');
234234
$doc->loadXML('<foo><foo><!-- foo --></foo></foo>');
235235
$this->assertEquals(array('foo' => null), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
236236

237-
$doc = new \DOMDocument("1.0");
237+
$doc = new \DOMDocument('1.0');
238238
$doc->loadXML('<foo><foo foo="bar"/><foo foo="bar"/></foo>');
239239
$this->assertEquals(array('foo' => array(array('foo' => 'bar'), array('foo' => 'bar'))), XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \DomElement to an array');
240240
}

0 commit comments

Comments
 (0)