Skip to content

Commit 35ee642

Browse files
php cs fixer
1 parent 66efc19 commit 35ee642

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

inc/field.class.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -976,11 +976,11 @@ public static function showForTab($params)
976976
}
977977
echo '</div>';
978978

979-
//JS to trigger any change and check if container need to be display or not
980-
$ajax_url = $CFG_GLPI['root_doc'] . '/plugins/fields/ajax/container.php';
981-
$items_id = !$item->isNewItem() ? $item->getID() : 0;
982-
echo Html::scriptBlock(
983-
<<<JAVASCRIPT
979+
//JS to trigger any change and check if container need to be display or not
980+
$ajax_url = $CFG_GLPI['root_doc'] . '/plugins/fields/ajax/container.php';
981+
$items_id = !$item->isNewItem() ? $item->getID() : 0;
982+
echo Html::scriptBlock(
983+
<<<JAVASCRIPT
984984
function refreshContainer() {
985985
const data = $('#{$html_id}').closest('form').serializeArray().reduce(
986986
function(obj, item) {

tests/PluginFieldsContainerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -654,14 +654,14 @@ public function testShowForTabDisplaysMultipleContainers(): void
654654

655655
// check if the HTML contains both containers
656656
$this->assertStringContainsString(
657-
'id=\'plugin_fields_container_'.$idContainer1.'\'',
657+
'id=\'plugin_fields_container_' . $idContainer1 . '\'',
658658
$html,
659-
"Container 1 (id=$idContainer1) not displayed"
659+
"Container 1 (id=$idContainer1) not displayed",
660660
);
661661
$this->assertStringContainsString(
662-
'id=\'plugin_fields_container_'.$idContainer2.'\'',
662+
'id=\'plugin_fields_container_' . $idContainer2 . '\'',
663663
$html,
664-
"Container 2 (id=$idContainer2) not displayed"
664+
"Container 2 (id=$idContainer2) not displayed",
665665
);
666666
$this->deleteAllContainers();
667667
}
@@ -703,7 +703,7 @@ public function testShowForTabRightsAreEnforced(): void
703703
$this->assertNotSame(
704704
'',
705705
$htmlWithRight,
706-
'Container should be visible for a profile with right.'
706+
'Container should be visible for a profile with right.',
707707
);
708708
// end case 1
709709

@@ -717,7 +717,7 @@ public function testShowForTabRightsAreEnforced(): void
717717
$this->assertSame(
718718
'',
719719
$htmlNoRight,
720-
'Container should not be visible for a profile without right.'
720+
'Container should not be visible for a profile without right.',
721721
);
722722
// end case 2
723723
$this->deleteAllContainers();

0 commit comments

Comments
 (0)