Skip to content

Commit 9e42499

Browse files
committed
Fix code style errors
1 parent 64e6728 commit 9e42499

File tree

3 files changed

+15
-19
lines changed

3 files changed

+15
-19
lines changed

src/View/Elements/filter_form_begin.ctp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
LGPL <http://www.gnu.org/licenses/lgpl.html>
1111
GPL <http://www.gnu.org/licenses/gpl.html>
1212
13-
@var mixed[] $options
13+
@var array<mixed> $options
1414
@var string $modelName
1515
@var \Cake\View\View $this
1616
*/
@@ -19,20 +19,19 @@
1919
<div class="filterForm">
2020
<?php echo $this->Form->create(
2121
false,
22-
array(
23-
'url' => array(
22+
[
23+
'url' => [
2424
'plugin' => $this->getRequest()->getParam('plugin'),
25-
'controller' => $this->getRequest()->getParam('controller'),
26-
'action' => $this->getRequest()->getParam('action'),
27-
),
28-
'id' => $modelName.'Filter',
29-
) + $options
25+
'controller' => $this->getRequest()->getParam('controller'),
26+
'action' => $this->getRequest()->getParam('action'),
27+
],
28+
'id' => $modelName . 'Filter',
29+
] + $options
3030
); ?>
3131
<fieldset>
3232
<?php
33-
if (isset($options['legend']))
34-
{
33+
if (isset($options['legend'])) {
3534
?><legend><?php echo $options['legend']; ?></legend><?php
3635
}
3736
?>
38-
<?php echo $this->Form->control('Filter.filterFormId', array('type' => 'hidden', 'value' => $modelName)); ?>
37+
<?php echo $this->Form->control('Filter.filterFormId', ['type' => 'hidden', 'value' => $modelName]); ?>

src/View/Elements/filter_form_end.ctp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
GPL <http://www.gnu.org/licenses/gpl.html>
1212
1313
@var \Cake\View\View $this
14-
*/
14+
*/
1515
?>
1616
</fieldset>
1717
<?php echo $this->Form->submit(__('Submit')); ?>

src/View/Elements/filter_form_fields.ctp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,11 @@
1111
GPL <http://www.gnu.org/licenses/gpl.html>
1212
1313
@var \Cake\View\View $this
14-
*/
14+
*/
1515

16-
if (isset($viewFilterParams))
17-
{
18-
foreach ($viewFilterParams as $field)
19-
{
20-
if(empty($includeFields) || in_array($field['name'], $includeFields))
21-
{
16+
if (isset($viewFilterParams)) {
17+
foreach ($viewFilterParams as $field) {
18+
if (empty($includeFields) || in_array($field['name'], $includeFields)) {
2219
$fieldName = explode('.', $field['name']);
2320
if (count($fieldName) === 2) {
2421
$field['options']['name'] = sprintf('data[%s][%s]', $fieldName[0], $fieldName[1]);

0 commit comments

Comments
 (0)