Skip to content

Commit 3787739

Browse files
committed
cs fix
1 parent 71d2e90 commit 3787739

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

src/GeneratorHelper.php

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle;
413

514
class GeneratorHelper

src/Maker/MakeCrud.php

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony MakerBundle package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\MakerBundle\Maker;
413

514
use Doctrine\Common\Inflector\Inflector;
615
use Doctrine\ORM\EntityManager;
7-
use Doctrine\ORM\Mapping\ClassMetadataInfo;
816
use Psr\Container\ContainerInterface;
917
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
1018
use Symfony\Bundle\MakerBundle\ConsoleStyle;
@@ -81,7 +89,7 @@ public function getParameters(InputInterface $input): array
8189

8290
$helper = new GeneratorHelper();
8391

84-
return array(
92+
return [
8593
'helper' => $helper,
8694
'controller_class_name' => $controllerClassName,
8795
'entity_var_plural' => lcfirst(Inflector::pluralize($entityClassName)),
@@ -93,15 +101,15 @@ public function getParameters(InputInterface $input): array
93101
'route_path' => Str::asRoutePath(str_replace('Controller', '', $controllerClassName)),
94102
'route_name' => Str::asRouteName(str_replace('Controller', '', $controllerClassName)),
95103
'base_layout_exists' => $baseLayoutExists,
96-
);
104+
];
97105
}
98106

99107
/**
100108
* {@inheritdoc}
101109
*/
102110
public function getFiles(array $params): array
103111
{
104-
return array(
112+
return [
105113
__DIR__.'/../Resources/skeleton/crud/controller/Controller.tpl.php' => 'src/Controller/'.$params['controller_class_name'].'.php',
106114
// __DIR__.'/../Resources/skeleton/crud/form/Type.tpl.php' => 'src/Form/'.$params['form_class_name'].'.php',
107115
__DIR__.'/../Resources/skeleton/crud/templates/_delete_form.tpl.php' => 'templates/'.$params['route_name'].'/_delete_form.html.twig',
@@ -110,7 +118,7 @@ public function getFiles(array $params): array
110118
__DIR__.'/../Resources/skeleton/crud/templates/show.tpl.php' => 'templates/'.$params['route_name'].'/show.html.twig',
111119
__DIR__.'/../Resources/skeleton/crud/templates/new.tpl.php' => 'templates/'.$params['route_name'].'/new.html.twig',
112120
__DIR__.'/../Resources/skeleton/crud/templates/edit.tpl.php' => 'templates/'.$params['route_name'].'/edit.html.twig',
113-
);
121+
];
114122
}
115123

116124
public function writeSuccessMessage(array $params, ConsoleStyle $io)

0 commit comments

Comments
 (0)