Skip to content

Commit

Permalink
Fix putting the class-opening bracket on its own line
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jan 15, 2025
1 parent 468ff27 commit c4a9f73
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions templates/controller/Controller.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<?= $class_data->getUseStatements(); ?>

<?= $class_data->getClassDeclaration(); ?>

{
<?= $generator->generateRouteForControllerMethod($route_path, $route_name); ?>
public function <?= $method_name ?>(): <?php if ($with_template) { ?>Response<?php } else { ?>JsonResponse<?php } ?>
Expand Down
1 change: 1 addition & 0 deletions templates/controller/test/Test.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<?= $class_data->getUseStatements(); ?>

<?= $class_data->getClassDeclaration(); ?>

{
public function testIndex(): void
{
Expand Down
1 change: 1 addition & 0 deletions templates/crud/controller/Controller.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#[Route('<?= $route_path ?>')]
<?= $class_data->getClassDeclaration() ?>

{
<?= $generator->generateRouteForControllerMethod('', sprintf('%s_index', $route_name), ['GET']) ?>
<?php if (isset($repository_full_class_name)): ?>
Expand Down
1 change: 1 addition & 0 deletions templates/crud/test/Test.EntityManager.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<?= $class_data->getUseStatements(); ?>

<?= $class_data->getClassDeclaration() ?>

{
private KernelBrowser $client;
private EntityManagerInterface $manager;
Expand Down
1 change: 1 addition & 0 deletions templates/security/Voter.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<?= $class_data->getUseStatements(); ?>

<?= $class_data->getClassDeclaration() ?>

{
public const EDIT = 'POST_EDIT';
public const VIEW = 'POST_VIEW';
Expand Down
1 change: 1 addition & 0 deletions templates/validator/Constraint.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
<?= $class_data->getClassDeclaration(); ?>

{
public string $message = 'The string "{{ string }}" contains an illegal character: it can only contain letters or numbers.';

Expand Down
1 change: 1 addition & 0 deletions templates/validator/Validator.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<?= $class_data->getUseStatements(); ?>

<?= $class_data->getClassDeclaration(); ?>

{
public function validate(mixed $value, Constraint $constraint): void
{
Expand Down

0 comments on commit c4a9f73

Please sign in to comment.