Skip to content

Commit

Permalink
style: code style errors
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <[email protected]>
  • Loading branch information
btry committed Apr 1, 2021
1 parent 0447cbf commit d1f4554
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
23 changes: 11 additions & 12 deletions inc/form_validator.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,9 @@ class='submit'>";
echo '<tr>';
}


echo $header_begin.$header_bottom.$header_end;
echo "</table>";
}
}

public static function import(PluginFormcreatorLinker $linker, $input = [], $forms_id = 0) {
$formFk = PluginFormcreatorForm::getForeignKeyField();
Expand Down Expand Up @@ -464,7 +463,7 @@ public function dropdownValidatorUser(PluginFormcreatorForm $form) {
*
* @return DBmysqlIterator
*/
public function getAvailableValidatorGroups() {
public function getAvailableValidatorGroups() {
global $DB;

$userTable = User::getTable();
Expand Down Expand Up @@ -534,7 +533,7 @@ public function getAvailableValidatorGroups() {
* @param PluginFormcreatorForm $form
* @return void
*/
public function dropdownValidatorGroup(PluginFormcreatorForm $form) {
public function dropdownValidatorGroup(PluginFormcreatorForm $form) {
// get all posible validator groups
$groups = $this->getAvailableValidatorGroups();
$validatorGroups = [];
Expand Down Expand Up @@ -564,7 +563,7 @@ public function addMultipleItems($input) {
if (isset($input['_validator_users']) && is_array($input['_validator_users'])) {
$newItems = [];
foreach ($input['_validator_users'] as $userId) {
$newId = $this->add([
$newId = $this->add([
$formFk => $input[$formFk],
'itemtype' => User::getType(),
'items_id' => $userId,
Expand All @@ -584,13 +583,13 @@ public function addMultipleItems($input) {
'itemtype' => Group::getType(),
'items_id' => $userId,
'level' => $input['level'],
]);
if ($newId === false) {
$success = false;
}
}
}
return $success;
]);
if ($newId === false) {
$success = false;
}
}
}
return $success;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions inc/formanswer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,8 @@ public function canValidate(): bool {
$validatorGroups[] = $row['items_id'];
break;
case User::class:
// check if the user is a validator
if ($currentUser == $row['items_id']) {
// check if the user is a validator
if ($currentUser == $row['items_id']) {
// Current user found in the curent valdiation level
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion install/upgrade_to_2.12.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,6 @@ public function addValidationPercent() {
$this->migration->addField($table, 'validation_percent', 'integer', ['after' => 'status']);

$table = 'glpi_plugin_formcreator_forms_validators';
$this->migration->addField($table, 'level', 'integer', ['after' => 'items_id', 'value' => '1']);
$this->migration->addField($table, 'level', 'integer', ['after' => 'items_id', 'value' => '1']);
}
}

0 comments on commit d1f4554

Please sign in to comment.