Skip to content

Commit bc6d85e

Browse files
committed
post rebase fix (lint)
1 parent 6139356 commit bc6d85e

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

install/migrations/update_11.0.x_to_11.1.0/ola.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ function migrate_items_olas_data(Migration $migration): void
122122
// olas_id_tto field is removed : considere migration as done
123123
return;
124124
}
125-
$tickets_with_ola = $_ticket->find(['OR' =>
126-
[
125+
$tickets_with_ola = $_ticket->find(['OR'
126+
=> [
127127
['NOT' => ['olas_id_tto' => null]],
128128
['NOT' => ['olas_id_ttr' => null]],
129129
]]);

src/Glpi/Search/Provider/SQLProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5813,7 +5813,7 @@ public static function giveItem(
58135813
case "glpi_tickets.time_to_own":
58145814
// Due date + progress
58155815
if (in_array($orig_id, [151, 158, 181])) {
5816-
$out = htmlescape(\Html::convDateTime($data[$ID][0]['name']));
5816+
$out = htmlescape(Html::convDateTime($data[$ID][0]['name']));
58175817

58185818
$color = null;
58195819
if (
@@ -6053,7 +6053,7 @@ public static function giveItem(
60536053
($ticket_status == Ticket::SOLVED)
60546054
|| ($ticket_status == Ticket::CLOSED)
60556055
) {
6056-
$out .= $ola_name . ' : ' . htmlescape(\Html::convDateTime($due_time)) . '</br>';
6056+
$out .= $ola_name . ' : ' . htmlescape(Html::convDateTime($due_time)) . '</br>';
60576057
continue;
60586058
}
60596059

@@ -6067,7 +6067,7 @@ public static function giveItem(
60676067
($ola_type == SLM::TTO && $ola_end_time)
60686068
|| (in_array($orig_id, [180, 185]))
60696069
) {
6070-
$out .= $ola_name . ' : ' . htmlescape(\Html::convDateTime($due_time)) . '</br>';
6070+
$out .= $ola_name . ' : ' . htmlescape(Html::convDateTime($due_time)) . '</br>';
60716071
continue;
60726072
}
60736073

src/OLA.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ public function addLevelToDo(Ticket $ticket, $levels_id, $olas_id)
148148

149149
$_ticket = new Ticket();
150150
if (
151-
$_ticket->getFromDB($ticket->getID()) &&
152-
$this->levelCanBeAddedInLevelsTodo($ticket, $items_ola) &&
153-
$date !== null
151+
$_ticket->getFromDB($ticket->getID())
152+
&& $this->levelCanBeAddedInLevelsTodo($ticket, $items_ola)
153+
&& $date !== null
154154
) {
155155
$toadd = [];
156156
$toadd['date'] = $date;
@@ -243,10 +243,10 @@ public function getAddConfirmation(): array
243243
private function levelCanBeAddedInLevelsTodo(Ticket $ticket, Item_Ola $items_ola): bool
244244
{
245245
if (
246-
$ticket->isDeleted() ||
247-
$ticket->fields['status'] == CommonITILObject::CLOSED ||
248-
$ticket->fields['status'] == CommonITILObject::SOLVED ||
249-
!is_null($items_ola->fields['end_time'])
246+
$ticket->isDeleted()
247+
|| $ticket->fields['status'] == CommonITILObject::CLOSED
248+
|| $ticket->fields['status'] == CommonITILObject::SOLVED
249+
|| !is_null($items_ola->fields['end_time'])
250250
) {
251251
return false;
252252
}

src/Ticket.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5394,7 +5394,7 @@ public function getValueToSelect($field_id_or_search_options, $name = '', $value
53945394
public function showStatsDates()
53955395
{
53965396
// function to get strtotime safely, do not use if string is supposed to always be defined
5397-
$safe_get_strtime = static function ($date_string): int|null {
5397+
$safe_get_strtime = static function ($date_string): ?int {
53985398
try {
53995399
return strtotime((string) $date_string);
54005400
} catch (DatetimeException $e) {
@@ -6436,14 +6436,14 @@ private function transformOlasInputForBackwardCompatibility(array $input): array
64366436

64376437
// remove old fields and add new fields
64386438
if (isset($input['olas_id_tto'])) {
6439-
Toolbox::deprecated('Passing `olas_id_tto` input to ticket is deprecated.' .
6440-
' Use `_olas_id` (array) + `_la_update` instead.', version: "11.1");
6439+
Toolbox::deprecated('Passing `olas_id_tto` input to ticket is deprecated.'
6440+
. ' Use `_olas_id` (array) + `_la_update` instead.', version: "11.1");
64416441
$input['_olas_id'][] = $input['olas_id_tto'];
64426442
unset($input['olas_id_tto']);
64436443
}
64446444
if (isset($input['olas_id_ttr'])) {
6445-
Toolbox::deprecated('Passing `olas_id_ttr` input to ticket is deprecated.' .
6446-
' Use `_olas_id` (array) + `_la_update` instead.', version: "11.1");
6445+
Toolbox::deprecated('Passing `olas_id_ttr` input to ticket is deprecated.'
6446+
. ' Use `_olas_id` (array) + `_la_update` instead.', version: "11.1");
64476447
$input['_olas_id'][] = $input['olas_id_ttr'];
64486448
unset($input['olas_id_ttr']);
64496449
}

0 commit comments

Comments
 (0)