Skip to content

Commit 9dc3e65

Browse files
Correct coding standard
1 parent f76f28c commit 9dc3e65

File tree

10 files changed

+9
-14
lines changed

10 files changed

+9
-14
lines changed

src/Builder/Component/Scaffold.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,11 @@ public function build(): bool
235235
* @param string $var
236236
* @param mixed $fields
237237
* @param bool $useGetSetters
238-
* @param null|string $identityField
238+
* @param string|null $identityField
239239
*
240240
* @return string
241241
*/
242-
private function captureFilterInput(string $var, $fields, bool $useGetSetters, string $identityField = null): string
242+
private function captureFilterInput(string $var, $fields, bool $useGetSetters, ?string $identityField = null): string
243243
{
244244
$code = '';
245245
foreach ($fields as $field => $dataType) {

src/Builder/Path.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function getConfig($type = null): Config
7676
}
7777

7878
/**
79-
* @param null|string $path
79+
* @param string|null $path
8080
*/
8181
public function setRootPath(?string $path = null)
8282
{
@@ -86,7 +86,7 @@ public function setRootPath(?string $path = null)
8686
}
8787

8888
/**
89-
* @param null|string $path
89+
* @param string|null $path
9090
*/
9191
public function getRootPath(?string $path = null): string
9292
{

templates/module/Module.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public function registerServices(DiInterface $di)
4141
* Try to load local configuration
4242
*/
4343
if (file_exists(@@configName@@)) {
44-
4544
$config = $di['config'];
4645

4746
$override = @@configLoader@@;

templates/project/cli/bootstrap.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
if (isset($config["printNewLine"]) && $config["printNewLine"]) {
6868
echo PHP_EOL;
6969
}
70-
7170
} catch (Exception $e) {
7271
echo $e->getMessage() . PHP_EOL;
7372
echo $e->getTraceAsString() . PHP_EOL;

templates/project/cli/services.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,3 @@
3030

3131
return new $class($params);
3232
});
33-

templates/project/micro/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/**
1616
* Not found handler
1717
*/
18-
$app->notFound(function () use($app) {
18+
$app->notFound(function () use ($app) {
1919
$app->response->setStatusCode(404, "Not Found")->sendHeaders();
2020
echo $app['view']->render('404');
2121
});

templates/project/modules/services.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
$volt = new VoltEngine($view, $this);
5151
$volt->setOptions([
52-
'path' => function($templatePath) use ($config) {
52+
'path' => function ($templatePath) use ($config) {
5353
$basePath = $config->application->appDir;
5454
if ($basePath && substr($basePath, 0, 2) == '..') {
5555
$basePath = dirname(__DIR__);
@@ -72,7 +72,7 @@
7272
}
7373

7474
if (!is_dir($cacheDir . DIRECTORY_SEPARATOR . 'volt')) {
75-
@mkdir($cacheDir . DIRECTORY_SEPARATOR . 'volt' , 0755, true);
75+
@mkdir($cacheDir . DIRECTORY_SEPARATOR . 'volt', 0755, true);
7676
}
7777

7878
return $cacheDir . DIRECTORY_SEPARATOR . 'volt' . DIRECTORY_SEPARATOR . $filename;

templates/project/modules/services_cli.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/**
77
* Set the default namespace for dispatcher
88
*/
9-
$di->setShared('dispatcher', function() {
9+
$di->setShared('dispatcher', function () {
1010
$dispatcher = new Dispatcher();
1111
$dispatcher->setDefaultNamespace('@@namespace@@\Modules\Cli\Tasks');
1212
return $dispatcher;

templates/project/modules/services_web.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
/**
6666
* Set the default namespace for dispatcher
6767
*/
68-
$di->setShared('dispatcher', function() {
68+
$di->setShared('dispatcher', function () {
6969
$dispatcher = new Dispatcher();
7070
$dispatcher->setDefaultNamespace('@@namespace@@\Modules\Frontend\Controllers');
7171

templates/scaffold/no-forms/Controller.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ public function saveAction()
157157
$assignInputFromRequestUpdate$
158158
159159
if (!$singularVar$->save()) {
160-
161160
foreach ($singularVar$->getMessages() as $message) {
162161
$this->flash->error($message);
163162
}
@@ -199,7 +198,6 @@ public function deleteAction($pkVar$)
199198
}
200199

201200
if (!$singularVar$->delete()) {
202-
203201
foreach ($singularVar$->getMessages() as $message) {
204202
$this->flash->error($message);
205203
}

0 commit comments

Comments
 (0)