Skip to content

Commit 8208e7b

Browse files
committed
minor #14367 CS fixes (keradus)
This PR was merged into the 2.3 branch. Discussion ---------- CS fixes | 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 Update before releasing PHP CS Fixer 1.7. To keep fabbot.io happy ;) Commits ------- cfa3e95 CS fixes
2 parents c009eb8 + 162a046 commit 8208e7b

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
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()) {
@@ -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) {

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()

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

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;

Tests/Loader/YamlFileLoaderTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\DependencyInjection\ContainerBuilder;
1515
use Symfony\Component\DependencyInjection\Reference;
16-
use Symfony\Component\Config\Loader\Loader;
1716
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
1817
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
1918
use Symfony\Component\DependencyInjection\Loader\IniFileLoader;

0 commit comments

Comments
 (0)