Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit cef66f0

Browse files
committed
CS fixes
1 parent 0fb8d7d commit cef66f0

File tree

6 files changed

+8
-15
lines changed

6 files changed

+8
-15
lines changed

DependencyInjection/Configuration.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,3 @@ public function getConfigTreeBuilder()
4141
return $treeBuilder;
4242
}
4343
}
44-

ResourceRest/PayloadAliasRegistry.php renamed to PayloadAliasRegistry.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Cmf\Bundle\ResourceRestBundle\ResourceRest;
12+
namespace Symfony\Cmf\Bundle\ResourceRestBundle;
1313

1414
use Symfony\Cmf\Component\Resource\RepositoryFactoryInterface;
1515
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -41,8 +41,7 @@ class PayloadAliasRegistry
4141
public function __construct(
4242
RepositoryRegistryInterface $repositoryRegistry,
4343
array $aliases = array()
44-
)
45-
{
44+
) {
4645
$this->repositoryRegistry = $repositoryRegistry;
4746

4847
foreach ($aliases as $alias => $config) {
@@ -75,7 +74,7 @@ public function getPayloadAlias(Resource $resource)
7574

7675
if (!isset($this->aliasesByRepository[$repositoryType])) {
7776
throw new \RuntimeException(sprintf(
78-
'No repositories registered with alias "%s". I know about "%s"',
77+
'No repositories registered with alias "%s". Known aliases "%s"',
7978
$repositoryType,
8079
implode('", "', array_keys($this->aliasesByRepository))
8180
));

Resources/config/resource-rest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parameters>
88
<parameter key="cmf_resource_rest.controller.resource.class">Symfony\Cmf\Bundle\ResourceRestBundle\Controller\ResourceController</parameter>
99
<parameter key="cmf_resource_rest.path_helper.class">Symfony\Cmf\Bundle\ResourceRestBundle\Helper\PathHelper</parameter>
10-
<parameter key="cmf_resource_rest.payload_alias_registry.class">Symfony\Cmf\Bundle\ResourceRestBundle\ResourceRest\PayloadAliasRegistry</parameter>
10+
<parameter key="cmf_resource_rest.payload_alias_registry.class">Symfony\Cmf\Bundle\ResourceRestBundle\PayloadAliasRegistry</parameter>
1111
</parameters>
1212

1313
<services>

Serializer/EventSubscriber/ResourceSubscriber.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
use JMS\Serializer\EventDispatcher\ObjectEvent;
2020
use Puli\Repository\Api\Resource\Resource;
2121
use Symfony\Cmf\Component\Resource\RepositoryRegistryInterface;
22-
use Symfony\Cmf\Bundle\ResourceRestBundle\ResourceRest\PayloadAliasRegistry;
22+
use Symfony\Cmf\Bundle\ResourceRestBundle\PayloadAliasRegistry;
2323

2424
/**
2525
* Force instaces of ResourceCollection to type "ResourceCollection"
@@ -34,8 +34,7 @@ class ResourceSubscriber implements EventSubscriberInterface
3434
public function __construct(
3535
RepositoryRegistryInterface $registry,
3636
PayloadAliasRegistry $payloadAliasRegistry
37-
)
38-
{
37+
) {
3938
$this->registry = $registry;
4039
$this->payloadAliasRegistry = $payloadAliasRegistry;
4140
}

Tests/Unit/DependencyInjection/CmfResourceRestExtensionTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ public function provideExtension()
4545
public function testExtension($config, $expectedServiceIds)
4646
{
4747
$this->load($config);
48-
49-
foreach ($expectedServiceIds as $expectedServiceId) {
50-
$this->assertContainerBuilderHasService($expectedServiceId);
51-
}
5248
}
5349
}
5450

Tests/Unit/ResourceRest/PayloadAliasRegistryTest.php renamed to Tests/Unit/PayloadAliasRegistryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Cmf\Bundle\ResourceRestBundle\Tests\Helper;
12+
namespace Symfony\Cmf\Bundle\ResourceRestBundle\Tests;
1313

1414
use Prophecy\PhpUnit\ProphecyTestCase;
15-
use Symfony\Cmf\Bundle\ResourceRestBundle\ResourceRest\PayloadAliasRegistry;
15+
use Symfony\Cmf\Bundle\ResourceRestBundle\PayloadAliasRegistry;
1616

1717
class PayloadAliasRegistryTest extends ProphecyTestCase
1818
{

0 commit comments

Comments
 (0)