This commit is contained in:
Fabien Potencier 2019-05-08 19:18:10 +02:00
parent 6f3cffae09
commit 72863e441f
7 changed files with 18 additions and 18 deletions

View File

@ -714,7 +714,7 @@ EOF;
$code .= $this->addServiceInclude($id, $definition);
if ($this->getProxyDumper()->isProxyCandidate($definition)) {
$factoryCode = $asFile ? ($definition->isShared() ? "\$this->load('%s.php', false)" : "\$this->factories[%2\$s](false)") : '$this->%s(false)';
$factoryCode = $asFile ? ($definition->isShared() ? "\$this->load('%s.php', false)" : '$this->factories[%2$s](false)') : '$this->%s(false)';
$code .= $this->getProxyDumper()->getProxyFactoryCode($definition, $id, sprintf($factoryCode, $methodName, $this->doExport($id)));
}
@ -1456,14 +1456,14 @@ EOF;
if (!$this->container->hasDefinition($service)) {
return 'false';
}
$conditions[] = sprintf("isset(\$this->%s[%s])", $this->container->getDefinition($service)->isPublic() ? 'services' : 'privates', $this->doExport($service));
$conditions[] = sprintf('isset($this->%s[%s])', $this->container->getDefinition($service)->isPublic() ? 'services' : 'privates', $this->doExport($service));
}
foreach (ContainerBuilder::getServiceConditionals($value) as $service) {
if ($this->container->hasDefinition($service) && !$this->container->getDefinition($service)->isPublic()) {
continue;
}
$conditions[] = sprintf("\$this->has(%s)", $this->doExport($service));
$conditions[] = sprintf('$this->has(%s)', $this->doExport($service));
}
if (!$conditions) {

View File

@ -95,12 +95,12 @@ class SendersLocatorTest extends TestCase
$container = $this->createMock(ContainerInterface::class);
$container->expects($this->any())
->method('has')
->willReturnCallback(function($id) use ($senders) {
->willReturnCallback(function ($id) use ($senders) {
return isset($senders[$id]);
});
$container->expects($this->any())
->method('get')
->willReturnCallback(function($id) use ($senders) {
->willReturnCallback(function ($id) use ($senders) {
return $senders[$id];
});

View File

@ -103,6 +103,7 @@ class Connection
* @param int $delay The delay in milliseconds
*
* @return string The inserted id
*
* @throws \Doctrine\DBAL\DBALException
*/
public function send(string $body, array $headers, int $delay = 0): string

View File

@ -84,7 +84,6 @@ class DoctrineTransport implements TransportInterface, SetupableTransportInterfa
return ($this->receiver ?? $this->getReceiver())->find($id);
}
/**
* {@inheritdoc}
*/

View File

@ -41,7 +41,7 @@ class SendersLocator implements SendersLocatorInterface
{
$this->sendersMap = $sendersMap;
if (is_array($sendersLocator) || null === $sendersLocator) {
if (\is_array($sendersLocator) || null === $sendersLocator) {
@trigger_error(sprintf('"%s::__construct()" requires a "%s" as 2nd argument. Not doing so is deprecated since Symfony 4.3 and will be required in 5.0.', __CLASS__, ContainerInterface::class), E_USER_DEPRECATED);
// "%s" requires a "%s" as 2nd argument. Not doing so is deprecated since Symfony 4.3 and will be required in 5.0.'
$this->sendersLocator = new ServiceLocator([]);