@@ -94,6 +94,10 @@ |
||
| 94 | 94 | } |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | + /** |
|
| 98 | + * @param integer $serviceName |
|
| 99 | + * @param callable $callable |
|
| 100 | + */ |
|
| 97 | 101 | private function registerService($serviceName, $serviceProviderKey, ServiceProvider $serviceProvider, $callable, ContainerBuilder $container) { |
| 98 | 102 | $factoryDefinition = $this->getServiceDefinitionFromCallable($serviceName, $serviceProviderKey, $callable); |
| 99 | 103 | |
@@ -6,13 +6,10 @@ |
||
| 6 | 6 | |
| 7 | 7 | use Interop\Container\ServiceProvider; |
| 8 | 8 | use Invoker\Reflection\CallableReflection; |
| 9 | -use Puli\Discovery\Binding\ClassBinding; |
|
| 10 | -use Puli\GeneratedPuliFactory; |
|
| 11 | 9 | use Symfony\Component\DependencyInjection\Alias; |
| 12 | 10 | use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; |
| 13 | 11 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 14 | 12 | use Symfony\Component\DependencyInjection\Definition; |
| 15 | -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; |
|
| 16 | 13 | use Symfony\Component\DependencyInjection\Reference; |
| 17 | 14 | use TheCodingMachine\ServiceProvider\Registry; |
| 18 | 15 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | public function getServices() |
| 10 | 10 | { |
| 11 | 11 | return [ |
| 12 | - 'serviceA' => function (ContainerInterface $container) { |
|
| 12 | + 'serviceA' => function(ContainerInterface $container) { |
|
| 13 | 13 | $instance = new \stdClass(); |
| 14 | 14 | $instance->serviceB = $container->get('serviceB'); |
| 15 | 15 | |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public function getServices() |
| 11 | 11 | { |
| 12 | 12 | return [ |
| 13 | - 'serviceA' => [self::class, 'overrideServiceA'], |
|
| 13 | + 'serviceA' => [ self::class, 'overrideServiceA' ], |
|
| 14 | 14 | ]; |
| 15 | 15 | } |
| 16 | 16 | |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | )); |
| 31 | 31 | |
| 32 | 32 | if ($prev) { |
| 33 | - $message .= ' Message: ' . $prev->getMessage(); |
|
| 33 | + $message .= ' Message: '.$prev->getMessage(); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | return new static($message, 0, $prev); |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | * @param array $serviceProviders An array of service providers, in the format specified in thecodingmachine/service-provider-registry: https://github.com/thecodingmachine/service-provider-registry#how-does-it-work |
| 21 | 21 | * @param bool $usePuli |
| 22 | 22 | */ |
| 23 | - public function __construct(array $serviceProviders = [], $usePuli = true) |
|
| 23 | + public function __construct(array $serviceProviders = [ ], $usePuli = true) |
|
| 24 | 24 | { |
| 25 | 25 | $this->serviceProviders = $serviceProviders; |
| 26 | 26 | $this->usePuli = $usePuli; |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use Puli\Discovery\Api\Type\BindingType; |
| 8 | 8 | use Puli\Discovery\Binding\ClassBinding; |
| 9 | 9 | use Puli\Discovery\InMemoryDiscovery; |
| 10 | -use Puli\SymfonyBundle\PuliBundle; |
|
| 11 | 10 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 12 | 11 | use TheCodingMachine\Interop\ServiceProviderBridgeBundle\Tests\Fixtures\TestServiceProvider; |
| 13 | 12 | use TheCodingMachine\Interop\ServiceProviderBridgeBundle\Tests\Fixtures\TestServiceProviderOverride; |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public function testExceptionMessageIfNoPuliBundle() |
| 73 | 73 | { |
| 74 | - $bundle = new InteropServiceProviderBridgeBundle([], true); |
|
| 74 | + $bundle = new InteropServiceProviderBridgeBundle([ ], true); |
|
| 75 | 75 | $container = new ContainerBuilder(); |
| 76 | 76 | $bundle->build($container); |
| 77 | 77 | $container->compile(); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | public function testPuliBundle() |
| 84 | 84 | { |
| 85 | - $container = $this->getContainer([], true); |
|
| 85 | + $container = $this->getContainer([ ], true); |
|
| 86 | 86 | |
| 87 | 87 | $serviceA = $container->get('serviceA'); |
| 88 | 88 | |