Skip to content

Commit e7ba0ec

Browse files
authored
minor #1582 [ci] php-cs-fixer it up
1 parent e8e4417 commit e7ba0ec

File tree

68 files changed

+297
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+297
-297
lines changed

src/Command/MakerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected function interact(InputInterface $input, OutputInterface $output): voi
7272
{
7373
if (!$this->fileManager->isNamespaceConfiguredToAutoload($this->generator->getRootNamespace())) {
7474
$this->io->note([
75-
sprintf('It looks like your app may be using a namespace other than "%s".', $this->generator->getRootNamespace()),
75+
\sprintf('It looks like your app may be using a namespace other than "%s".', $this->generator->getRootNamespace()),
7676
'To configure this and make your life easier, see: https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html#configuration',
7777
]);
7878
}

src/DependencyBuilder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,18 @@ public function getMissingPackagesMessage(string $commandName, $message = null):
9191

9292
$packagesCount = \count($packages) + \count($packagesDev);
9393

94-
$message = sprintf(
94+
$message = \sprintf(
9595
"Missing package%s: %s, run:\n",
9696
$packagesCount > 1 ? 's' : '',
97-
$message ?: sprintf('to use the %s command', $commandName)
97+
$message ?: \sprintf('to use the %s command', $commandName)
9898
);
9999

100100
if (!empty($packages)) {
101-
$message .= sprintf("\ncomposer require %s", implode(' ', $packages));
101+
$message .= \sprintf("\ncomposer require %s", implode(' ', $packages));
102102
}
103103

104104
if (!empty($packagesDev)) {
105-
$message .= sprintf("\ncomposer require %s --dev", implode(' ', $packagesDev));
105+
$message .= \sprintf("\ncomposer require %s --dev", implode(' ', $packagesDev));
106106
}
107107

108108
return $message;

src/DependencyInjection/CompilerPass/MakeCommandRegistrationPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function process(ContainerBuilder $container): void
3535

3636
$class = $container->getParameterBag()->resolveValue($def->getClass());
3737
if (!is_subclass_of($class, MakerInterface::class)) {
38-
throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, MakerInterface::class));
38+
throw new InvalidArgumentException(\sprintf('Service "%s" must implement interface "%s".', $id, MakerInterface::class));
3939
}
4040

4141
$commandDefinition = new ChildDefinition('maker.auto_command.abstract');
@@ -71,7 +71,7 @@ public function process(ContainerBuilder $container): void
7171
$commandDefinition->addTag('console.command', ['command' => $alias, 'description' => 'Deprecated alias of "make:listener"']);
7272
}
7373

74-
$container->setDefinition(sprintf('maker.auto_command.%s', Str::asTwigVariable($class::getCommandName())), $commandDefinition);
74+
$container->setDefinition(\sprintf('maker.auto_command.%s', Str::asTwigVariable($class::getCommandName())), $commandDefinition);
7575
}
7676
}
7777
}

src/DependencyInjection/CompilerPass/SetDoctrineAnnotatedPrefixesPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function process(ContainerBuilder $container): void
4646
if ($arguments[0] instanceof Definition) {
4747
$class = $arguments[0]->getClass();
4848

49-
$id = sprintf('.%d_doctrine_metadata_driver~%s', $i, ContainerBuilder::hash($arguments));
49+
$id = \sprintf('.%d_doctrine_metadata_driver~%s', $i, ContainerBuilder::hash($arguments));
5050
$container->setDefinition($id, $arguments[0]);
5151
$arguments[0] = new Reference($id);
5252
$methodCalls[$i] = [$method, $arguments];

src/Docker/DockerDatabaseServices.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,23 @@ public static function getDatabaseSkeleton(string $name, string $version): array
2828
switch ($name) {
2929
case 'mariadb':
3030
return [
31-
'image' => sprintf('mariadb:%s', $version),
31+
'image' => \sprintf('mariadb:%s', $version),
3232
'environment' => [
3333
'MYSQL_ROOT_PASSWORD' => 'password',
3434
'MYSQL_DATABASE' => 'main',
3535
],
3636
];
3737
case 'mysql':
3838
return [
39-
'image' => sprintf('mysql:%s', $version),
39+
'image' => \sprintf('mysql:%s', $version),
4040
'environment' => [
4141
'MYSQL_ROOT_PASSWORD' => 'password',
4242
'MYSQL_DATABASE' => 'main',
4343
],
4444
];
4545
case 'postgres':
4646
return [
47-
'image' => sprintf('postgres:%s', $version),
47+
'image' => \sprintf('postgres:%s', $version),
4848
'environment' => [
4949
'POSTGRES_PASSWORD' => 'main',
5050
'POSTGRES_USER' => 'main',
@@ -101,6 +101,6 @@ public static function getMissingExtensionName(string $name): ?string
101101
*/
102102
private static function throwInvalidDatabase(string $name): never
103103
{
104-
throw new RuntimeCommandException(sprintf('%s is not a valid / supported docker database type.', $name));
104+
throw new RuntimeCommandException(\sprintf('%s is not a valid / supported docker database type.', $name));
105105
}
106106
}

src/Doctrine/DoctrineHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function doesClassUseDriver(string $className, string $driverClass): bool
8989
}
9090

9191
if (null === $em) {
92-
throw new \InvalidArgumentException(sprintf('Cannot find the entity manager for class "%s". Ensure entity uses attribute mapping.', $className));
92+
throw new \InvalidArgumentException(\sprintf('Cannot find the entity manager for class "%s". Ensure entity uses attribute mapping.', $className));
9393
}
9494

9595
if (null === $this->mappingDriversByPrefix) {
@@ -306,7 +306,7 @@ public static function getTypeConstant(string $columnType): ?string
306306
return null;
307307
}
308308

309-
return sprintf('Types::%s', $constants[$columnType]);
309+
return \sprintf('Types::%s', $constants[$columnType]);
310310
}
311311

312312
private function isInstanceOf($object, string $class): bool

src/Doctrine/EntityDetails.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function getFormFields(): array
7777
}
7878
$fieldsWithTypes[$fieldName] = [
7979
'type' => EntityType::class,
80-
'options_code' => sprintf('\'class\' => %s::class,', $relation['targetEntity']).\PHP_EOL.'\'choice_label\' => \'id\',',
80+
'options_code' => \sprintf('\'class\' => %s::class,', $relation['targetEntity']).\PHP_EOL.'\'choice_label\' => \'id\',',
8181
'extra_use_classes' => [$relation['targetEntity']],
8282
];
8383
if (\Doctrine\ORM\Mapping\ClassMetadata::MANY_TO_MANY === $relation['type']) {

src/Doctrine/EntityRegenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ public function regenerateEntities(string $classOrNamespace): void
4646
if ($metadata instanceof ClassMetadata) {
4747
$metadata = [$metadata];
4848
} elseif (class_exists($classOrNamespace)) {
49-
throw new RuntimeCommandException(sprintf('Could not find Doctrine metadata for "%s". Is it mapped as an entity?', $classOrNamespace));
49+
throw new RuntimeCommandException(\sprintf('Could not find Doctrine metadata for "%s". Is it mapped as an entity?', $classOrNamespace));
5050
} elseif (empty($metadata)) {
51-
throw new RuntimeCommandException(sprintf('No entities were found in the "%s" namespace.', $classOrNamespace));
51+
throw new RuntimeCommandException(\sprintf('No entities were found in the "%s" namespace.', $classOrNamespace));
5252
}
5353

5454
/** @var ClassSourceManipulator[] $operations */

src/Doctrine/EntityRelation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct(
3434
private string $inverseClass,
3535
) {
3636
if (!\in_array($type, self::getValidRelationTypes())) {
37-
throw new \Exception(sprintf('Invalid relation type "%s"', $type));
37+
throw new \Exception(\sprintf('Invalid relation type "%s"', $type));
3838
}
3939

4040
if (self::ONE_TO_MANY === $type) {

src/EventRegistry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function getEventClassName(string $event): ?string
116116
public function listActiveEvents(array $events): array
117117
{
118118
foreach ($events as $key => $event) {
119-
$events[$key] = sprintf('%s (<fg=yellow>%s</>)', $event, self::$eventsMap[$event]);
119+
$events[$key] = \sprintf('%s (<fg=yellow>%s</>)', $event, self::$eventsMap[$event]);
120120
}
121121

122122
return $events;

0 commit comments

Comments
 (0)