Skip to content

Commit e7aaa42

Browse files
committed
Fix CS error
1 parent 3a55065 commit e7aaa42

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

src/Listener/ViewListener.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ protected function _getRelatedModels(array $associationTypes = []): array
229229
foreach ($associationTypes as $assocType) {
230230
$associations = array_merge(
231231
$associations,
232-
$this->_model()->associations()->getByType($assocType)
232+
$this->_model()->associations()->getByType($assocType),
233233
);
234234
}
235235
}
@@ -273,7 +273,7 @@ protected function _getPageVariables(): array
273273
$data = [
274274
'modelClass' => $modelClass,
275275
'singularHumanName' => Inflector::humanize(
276-
Inflector::underscore(Inflector::singularize($modelClass))
276+
Inflector::underscore(Inflector::singularize($modelClass)),
277277
),
278278
'pluralHumanName' => Inflector::humanize(Inflector::underscore($controller->getName())),
279279
'singularVar' => Inflector::singularize($controller->getName()),
@@ -310,7 +310,7 @@ protected function _scaffoldFields(array $associations = []): array
310310
$action = $this->_action();
311311
$scaffoldFields = Hash::normalize(
312312
(array)$action->getConfig('scaffold.fields'),
313-
default: []
313+
default: [],
314314
);
315315

316316
if (empty($scaffoldFields) || $action->getConfig('scaffold.autoFields')) {
@@ -342,7 +342,7 @@ protected function _scaffoldFields(array $associations = []): array
342342

343343
$fieldSettings = Hash::normalize(
344344
(array)$action->getConfig('scaffold.field_settings'),
345-
default: []
345+
default: [],
346346
);
347347
$fieldSettings = array_intersect_key($fieldSettings, $scaffoldFields);
348348
$scaffoldFields = Hash::merge($scaffoldFields, $fieldSettings);
@@ -467,7 +467,7 @@ protected function _getControllerActionConfiguration(string $actionName, array $
467467
'method' => $method,
468468
'options' => array_diff_key(
469469
$config,
470-
array_flip(['method', 'scope', 'link_title', 'url', 'scaffold', 'callback'])
470+
array_flip(['method', 'scope', 'link_title', 'url', 'scaffold', 'callback']),
471471
),
472472
];
473473
if (!empty($config['callback'])) {
@@ -493,7 +493,7 @@ protected function _getAllowedActions(): array
493493

494494
$allActions = array_merge(
495495
Hash::normalize($actions, default: []),
496-
Hash::normalize($extraActions, default: [])
496+
Hash::normalize($extraActions, default: []),
497497
);
498498

499499
$blacklist = (array)$this->_action()->getConfig('scaffold.actions_blacklist');
@@ -547,13 +547,13 @@ protected function _associations(array $whitelist = []): array
547547
$associationConfiguration[$type][$assocKey]['plugin'] = pluginSplit($association->getClassName())[0];
548548
$associationConfiguration[$type][$assocKey]['controller'] = $assocKey;
549549
$associationConfiguration[$type][$assocKey]['entity'] = Inflector::singularize(
550-
Inflector::underscore($assocKey)
550+
Inflector::underscore($assocKey),
551551
);
552552
$associationConfiguration[$type][$assocKey]['entities'] = Inflector::underscore($assocKey);
553553

554554
$associationConfiguration[$type][$assocKey] = array_merge(
555555
$associationConfiguration[$type][$assocKey],
556-
$this->_action()->getConfig('association.' . $assocKey) ?: []
556+
$this->_action()->getConfig('association.' . $assocKey) ?: [],
557557
);
558558
}
559559

src/View/Helper/CrudViewHelper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ public function createRelationLink(string $alias, array $relation, array $option
401401
'_redirect_url' => $this->getView()->getRequest()->getUri()->getPath(),
402402
],
403403
],
404-
$options
404+
$options,
405405
);
406406
}
407407

@@ -420,7 +420,7 @@ public function createViewLink(string $title, array $options = []): string
420420
return $this->Html->link(
421421
$title,
422422
['action' => 'view', $entity->get($this->getViewVar('primaryKey'))],
423-
$options
423+
$options,
424424
);
425425
}
426426

@@ -497,8 +497,8 @@ public function getCssClasses(): string
497497
sprintf('scaffold-%s-%s', $pluralVar, $action),
498498
],
499499
$args,
500-
$viewClasses
501-
))
500+
$viewClasses,
501+
)),
502502
);
503503
}
504504
}

src/View/Widget/DateTimeWidget.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function render(array $data, ContextInterface $context): string
9595
// This is the format that will be display to user
9696
if (isset($datetimePicker['data-alt-format'])) {
9797
$datetimePicker['data-alt-format'] = $this->convertPHPToDatePickerFormat(
98-
$datetimePicker['data-alt-format']
98+
$datetimePicker['data-alt-format'],
9999
);
100100
$datetimePicker['data-alt-input'] = 'true';
101101
}
@@ -147,7 +147,7 @@ public function render(array $data, ContextInterface $context): string
147147
'templateVars' => $data['templateVars'],
148148
'attrs' => $this->_templates->formatAttributes(
149149
$data,
150-
['name', 'type']
150+
['name', 'type'],
151151
),
152152
]);
153153

@@ -163,7 +163,7 @@ public function render(array $data, ContextInterface $context): string
163163
'templateVars' => $data['templateVars'],
164164
'attrs' => $this->_templates->formatAttributes(
165165
$datetimePicker,
166-
['toggleIcon', 'clearIcon']
166+
['toggleIcon', 'clearIcon'],
167167
),
168168
]);
169169
}

tests/TestCase/View/CrudViewTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testCreation()
2424
'fieldFormatters' => ['datetime' => 'formatTime'],
2525
],
2626
],
27-
]
27+
],
2828
);
2929

3030
$expected = [

tests/TestCase/View/Helper/CrudViewHelperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function testProcess(): void
7676

7777
$this->assertSame(
7878
'1/15/00',
79-
$this->CrudView->process('user.birth_date', $entity)
79+
$this->CrudView->process('user.birth_date', $entity),
8080
);
8181
}
8282

0 commit comments

Comments
 (0)